Hi,
I'm doing a new project and it require to change mode every time you press the switch button.
The project is basically pressing the switch button and the lights change from one mode to another then turned off.
What is the code for the switch button?
Light mode project
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Light mode project
The code depends on how you have your circuit wired. Could you post a schematic of your circuit and a complete and precise description of what you want to happen?
-
- Posts: 37
- Joined: Sun May 10, 2009 8:36 pm
Re: Light mode project
I'm planning on know how to code the switch first because I don't have a schematic right now..
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Light mode project
Tutorial #5 as suggested above by mbtf0 is the best place to start. It explains reading and debouncing button presses, as well as pullup/pulldown resistors.
Please be positive and constructive with your questions and comments.