Pages: [1]   Go Down
Author Topic: Maxduino Analogue issue  (Read 327 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using an analogue input for a button. When the button is pressed the number changes to 1, when it is pressed again it goes to 0. This is fine when using a Toggle Box, it just checks and unchecks, but when I use a bang (which I want to send when the number changes) it works, but because the number is constantly updated there is always a constant banging going on.



I just want it to bang when the toggle changes. How can I do this?
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 1
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll need another variable to maintain the state of the switch.  Then, when the state changes, you send whatever you need to send.
Logged

Pages: [1]   Go Up
Jump to: