General area when it fits no where else

Moderator: Mmiscool

User avatar
By Electroguard
#48286 I have posted a couple of new Driving Lesson chapters.
ESP_Basic 3 offered a golden opportunity for its release to be accompanied by appropriate documentation however long it might have taken. But it hasn't happened. If ESP_Basic 1 was the birth of a baby, ESP_Basic 2 was a toddler, and I feel ESP_Basic 3 is trying to push the toddler into becoming an olympic athlete before it is even completely potty-trained. Without the existing problems being sorted out (and by problems I basically mean lack of documentation) they will become embedded into any future growth and never resolved.
Take interrupt as an example... but unfortunately we can't - because it doesn't have an example! There is no explanation that interrupt requires a hardware pullup resistor to work, or that it generates an interrupt on both press and release which will effectively cancel each other out unless one of the interrupts is filtered out. It is a clever and useful implementation, but it is unable to be used by those who don't know how to use it, and has no way for them to learn how to use it other than by individual painful trial and error which will probably be abandoned in frustration by many. Even more frustrating is to be told that something like HTMLID() is available which could achieve a required task but without any info available for how to achieve it. It is such a great shame that such a clever concept and implementation is being let down simply from lack of useful examples and explanation.
Driving Lessons was my attempt to contribute by trying to bridge the gap between what's in the developers brilliant minds and the info that ordinary Joe Public needs to know to use such things. I knew where I wanted to go, so if I could find out how to get there I had an opportunity to pass on that info to others in the form of a more easily digested tutorial.
But the release of V3 shows that documentation is less of a priority than innovation, and even before the release of V3, too many questions remain unanswered for me to guess the missing answers or make sufficient headway. So it has become clear that I am in no position to be offering help to anyone. I have therefore wound it up by publishing the 2 almost completed V2 chapters, and must leave anything else for someone else who knows better than me to pick up and continue with if they choose. Please don't misunderstand, I know people are busy, and I am not complaining about any lack of useful personal help. I am simply pointing out the unavoidable conclusion that because I cannot find out the required ESP_Basic usage info to make any headway I obviously have no progress to pass on for the benefit of others. Which I feel is a shame, because ESP_Basic could be so much more useful to so many more people (ie, popular) if only it had adequate accompanying examples and instructions for use. Lack of examples and info has been a voiced by other people in the past, and I feel the only way that situation is likely to change in the future is if new development announcements are paused long enough to allow catchup.

I have working Sonoff V2 scripts for use with onboard DHT as a temperature or humidity stat controller, as a delayed On or Off timer, as a Cycled On or Off Duration timer, and as a udp network controlled switch, and also for 2 networked Sonoffs to be controlling each other with their onboard buttons. These are currently all dressed as unfinished tutorial excercises at the moment, but I will probably eventually strip them down and publish them as functional standalone V2 scripts for anyone who may want them.
User avatar
By Mmiscool
#48288 The lack of documentation is some thing that has been being addressed.

It is a process that takes significant time and effort. I personally have been pretty happy with how much the docs have been improving. They started off very small and have grown significantly.

As to an example for the interrupt here is a simple one.
I am using a node mcu and the d3 pin is connected to the flash button.
There was also a bug in the 3.0 release for this command so it will require it to updated. Uploading a new build right now as I type.

The io(laststat,D3) allows for the last status of the pin that was read to used for logic or to be place in variable or used in an expression.
Code: Select allinterrupt d3, [change]
wait

[change]
if io(laststat,d3) = 1 then print "Pin put high" else print "Pin Put low"
wait



As to the htmlid() and CSS for specific gui elements. I am not an expert at CSS and styling things. I do know that css can be applied to specific items by its html id tag. This tag is auto generated for each GUI item with kind of use in mind but I never attempted to do ant thing with it. If you google inline CSS and CSS for button by id I think a solution could be found but unfortunately there have been many fish to fry.
User avatar
By Electroguard
#48290 Thanks Mike, but I sorted interrupt out for myself weeks ago and already included instructions in the tutorial to help others use it ok.

It's the buttons that have been my great frustration for weeks. I have been trying every possible avenue I could think of, from image buttons, css basic buttons, html buttons, text links using msgbranching... and everything I've tried has had some problem or other that I couldn't overcome, so when I was told...
if you use the wprint command you can embed css code in your page.
The HTMLID() function will give you the html id tag for the last gui item you created. You can then use this id to aply css to a specific item.
No need to get to crazy with things. Just the out of the box commands.

... I knew it was pointless for me to continue trying to look for a solution any more.

Then I saw the V3 release announcement and jumped straight on it to see if msgbranch might not now be misbehaving for me as it was in V2, only to find I had another load of errors to resolve before I could even get a chance to start tackling any of the original problems... and the new help document was still showing me the same V2 syntax's even though the commands had apparently been changed - so for me, it was hopeless.

So yes, I agree that the documentation has come on a long way in just a few months - as has everything about ESP_Basic I might add - but V3 docs had all the same missing info for me as did V2, and brought with it too much new additional hassle for me to want to keep fighting the unknowns alone any more.

It was my own fault. I have absolutely no doubt that either of you 2 wizards could make ESP_Basic do the things I was trying to achieve for the tutorial without any problem, and given the appropriate examples and info I'm sure I could have succeeded also, but with only the current info that is available to me at the moment it was obviously a case of me biting off more than I could chew alone.

Give me a few days to recuperate and I'll try to post up some worthwhile V3 Sonoff examples, but I don't want to even look at V3 again for a couple of days.
User avatar
By Mmiscool
#48296 I just posted in the example of a toggle image button in the examples section
viewtopic.php?f=40&t=10211

Mabe this will help