Experiment#5: LED Graph (dot or Bar) trouble - please help
I'm following the instructions in the Stamp Works: Experiments and BASIC stamp Source Code, using BS2 RevJ
·
I have a picture of the circuit and my copied code from the book.· As I turn the 10k Pot I'm expecting the LEDs to turn on, nothing is happening.· The code loads onto the BS2 without issues, I have tried both 10K pots... I can even run my previous experiments without any issues .
·
If some can have a look at my code and attached Picture I would very much appreciate it!
·
Thanks
·
I have a picture of the circuit and my copied code from the book.· As I turn the 10k Pot I'm expecting the LEDs to turn on, nothing is happening.· The code loads onto the BS2 without issues, I have tried both 10K pots... I can even run my previous experiments without any issues .
·
If some can have a look at my code and attached Picture I would very much appreciate it!
·
Thanks
Comments
It seems in your initialization code you've set LEDs = %11111111 and you should set LEDsDirs = %11111111. Right now you're not setting the direction of the pins. When working with the BASIC Stamp, the default direction is to set all pins to inputs, and in order for the LEDs to light up, they need to be set to outputs.
Hope this helps!
Jessica
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jessica Uelmen
Education Department
Parallax, Inc.
Mike, I'm actually not using a PDF, I'm copying from a book and it does not contain the "conditional compiler directive" in its example. If you have that code handy or the PDF I would love to have a look and give it a try.
Additional Question:
Now that this is working I am finding that my LEDs start at 11111111 when the pot is at 695 (HiScale) expected,
when my pot is turned allmost all the way Lo at say 11 (inbetween lo -to- hi) the LEDs are 00000001, expected
But when the pot is turned ALL the way Lo 10 LoScale the LEDs jump back to 11111111... I didn't expect this
I am new to the coding part of electronics and I am curiouse what would be done differently to have the LEDs show 00000000 when the pot is all the way off?