Place to put your Basic demos and examples

Moderator: Mmiscool

User avatar
By sadat007
#37686 timer 1000 [do.some.stuff]
print "LED toggle each second"
button "Click me to exit" [Exit.ThisThing]
let a = 0
wait
[do.some.stuff]
if a = 1 then po 12 1 else po 12 0
if a = 1 then a = 0 else a = 1
wait
[Exit.ThisThing]
end
User avatar
By forlotto
#37718 Things you should specify with your project...

- What hardware are you using ESP01 ESP03 ESP08 ESP12 NodeMCU/espbasic wifi dev board?
- Is there an LED on this hardware or are you using an LED hooked up to this pin?
- If it is an LED from something else that is not on the board what voltage is the LED?
- If it is a separate LED do you have a picture of it?
- Is it a radial mounted LED ? If it is radial mounted having long legs which leg goes where.

Would be nice to see some pictures.

To keep things neat you should edit your post and wrap the code in code tags so people know hey this is code that we are using. Plus it allows the user the ability to reproduce your project and verify that it works easily because they can click select all and copy the code rather easy and try it all out. Just click the gear and select edit post when logged in highlight all the text and click the button that looks like this </> this should put code tags around your code.

I hope you share more about your project so that I can understand how it works fully.

And I can understand what hardware to use and how to use it ...

Thanks!

Here would be a replication of your project done on the Basic Wifi Dev Board with the LED that is on the board:
Code: Select alltimer 1000 [do.some.stuff]
print "LED toggle each second"
button "Click me to exit" [Exit.ThisThing]
let a = 0
wait
[do.some.stuff]
if a = 1 then po D4 0 else po D4 1
if a = 1 then a = 0 else a = 1
wait
[Exit.ThisThing]
end


Notice how using the code tags allows you to click select all and copy the code easily. For my project all of the hardware is included on the espbasic dev board so the materials needed Espbasic Dev Board http://www.esp8266basic.com/store/p1/ES ... Board.html