Show Posts
|
|
Pages: [1] 2
|
|
1
|
Community / Local Groups / Re: Sydney, Australia, help needed
|
on: April 01, 2011, 12:16:14 am
|
Rob thanks for your advice  I actually started talking to someone who I knew in primary school and he's actually building a satellite for UNSW now. He's a programming genius so I actually understand how to read code now!
|
|
|
|
|
2
|
Community / Local Groups / Re: Sydney, Australia, help needed
|
on: March 29, 2011, 07:35:35 am
|
not at all  just need someone to teach me the basics of arduino because we're given no help from our teacher and we're expected to produce something quite complex in the next few weeks.
|
|
|
|
|
3
|
Community / Local Groups / Sydney, Australia, help needed
|
on: March 28, 2011, 11:28:26 pm
|
hey there, i'm currently studying industrial design and i have a huge project due soon involving arduino we've hardly got any time to learn how to use it so i'm looking for someone that can help. i'll be more than happy to pay you 20/hr. i live close to sydney CBD so if it's suitable for you then reply! 
|
|
|
|
|
5
|
Using Arduino / LEDs and Multiplexing / Re: alternating LEDs using Bounce library
|
on: March 28, 2011, 10:56:22 pm
|
@ raron Debounce was the first thing that I came across when I was looking for a way of turning an LED off and on. If there's an easier method then I'd prefer to use it instead. Basically the other tutorials that I did would turn an LED on if the button was held down but as soon as the button was released, it would turn off again. So debounce did what I wanted it to do but if you can suggest a code that's easier to understand then that'd be great  thanks for your reply @ AWOL So i added a new button and a new LED to the code #include <Bounce.h> #define BUTTON 8 #define LED 12 #define LEDB 11 #define BUTTONB 7
int ledValue = HIGH; // This example changes the state of the LED everytime the button is pushed // Build the circuit indicated here: http://arduino.cc/en/Tutorial/Button
Bounce bouncer = Bounce( BUTTON, 2);
void setup() { pinMode(BUTTON,INPUT); pinMode(LED,OUTPUT); pinMode(BUTTONB,INPUT); pinMode(LEDB,OUTPUT); }
Is this done correctly?? How should I edit this part of the code if I want LEDB to turn on once LED turns off? void loop() {
if ( bouncer.update() ) { if ( bouncer.read() == LOW) { if ( ledValue == LOW) { ledValue = HIGH; } else { ledValue = LOW; } digitalWrite(LED,ledValue); } } }
|
|
|
|
|
6
|
Using Arduino / Motors, Mechanics, and Power / Re: Connecting a Motor to Arduino
|
on: March 28, 2011, 06:05:52 am
|
thank you both for your replies!!! i really appreciate it  i'm not sure which shield to buy, I've never used a bread board before and this project is due quite soon. Are there any shields that I can easily stack on top of the arduino? What's the easiest way to connect the motor shield to arduino? and by 'stack on' i mean sits on top of like the shield below 
|
|
|
|
|
7
|
Using Arduino / LEDs and Multiplexing / Re: alternating LEDs using Bounce library
|
on: March 28, 2011, 05:23:58 am
|
Sorry, I'm learning off a teacher that practically refuses to help us in any way. Yep, so I've added a new LED but how should I alter this part of the code?? void loop() {
if ( bouncer.update() ) { if ( bouncer.read() == LOW) { if ( ledValue == LOW) { ledValue = HIGH; } else { ledValue = LOW; } digitalWrite(LED,ledValue); } thanks so much for your help!! i really appreciate it
|
|
|
|
|
9
|
Using Arduino / LEDs and Multiplexing / Re: alternating LEDs using Bounce library
|
on: March 27, 2011, 12:58:01 pm
|
So far this is all I have  I'm so sorry but I'm completely new to this. I don't know how to add more LEDs/Buttons to the code. It would be great if you could help. #include <Bounce.h> #define BUTTON 8 #define LED 12
int ledValue = HIGH;
// This example changes the state of the LED everytime the button is pushed // Build the circuit indicated here: http://arduino.cc/en/Tutorial/Button
Bounce bouncer = Bounce( BUTTON, 2);
void setup() { pinMode(BUTTON,INPUT); pinMode(LED,OUTPUT); }
void loop() {
if ( bouncer.update() ) { if ( bouncer.read() == LOW) { if ( ledValue == LOW) { ledValue = HIGH; } else { ledValue = LOW; } digitalWrite(LED,ledValue); } } }
|
|
|
|
|
10
|
Using Arduino / LEDs and Multiplexing / Re: alternating LEDs using Bounce library
|
on: March 27, 2011, 12:06:50 pm
|
Sorry about that! So right now I haven't actually connected the other buttons/LEDs. I'm using an electronic brick chassis with digital pins d8 - d12 and analogue pins a1 - a5. The chassis looks like the one in this picture  So the idea is that nothing happens if you don't press the right button. LED 1 is initially on and when Button 1 is pressed (nothing happens when button 2 or button 3 is pressed), it turns off but LED 2 turns on then when Button 2 is pressed (nothing happens when button 1 or button 3 is pressed), LED 2 turns off and LED 3 turns on then when Button 3 is pressed (nothing happens when button 1 or button 2 is pressed), LED 3 turns off Hope that's enough info! Thanks so much for replying
|
|
|
|
|
11
|
Using Arduino / LEDs and Multiplexing / alternating LEDs using Bounce library
|
on: March 27, 2011, 10:55:48 am
|
Heya I'm currently using the bounce code below and it's been written to control one LED with one Button. I wanted to use THREE LEDs and THREE Buttons. Eg. Button 1, Button 2, Button 3, LED 1, LED 2, LED 3 I wanted to modify this code so that LED 1 is initially on and when Button 1 is pressed, it turns off but LED 2 turns on then when Button 2 is pressed, LED 2 turns off and LED 3 turns on then when Button 3 is pressed, LED 3 turns off  hope I explained it right!! I'd really appreciate any help! #include <Bounce.h> #define BUTTON 8 #define LED 12 int ledValue = HIGH; // This example changes the state of the LED everytime the button is pushed // Build the circuit indicated here: http://arduino.cc/en/Tutorial/ButtonBounce bouncer = Bounce( BUTTON, 2); void setup() { pinMode(BUTTON,INPUT); pinMode(LED,OUTPUT); } void loop() { if ( bouncer.update() ) { if ( bouncer.read() == LOW) { if ( ledValue == LOW) { ledValue = HIGH; } else { ledValue = LOW; } digitalWrite(LED,ledValue); } } }
|
|
|
|
|
13
|
Using Arduino / LEDs and Multiplexing / Re: Bounce tutorial
|
on: March 27, 2011, 09:42:25 am
|
Good question.. in the arduino playground it says "Put the Bounce folder in "your Arduino Sketch Folder/libraries/"." I'm not really sure where that is.. I'm using a mac and I can't find my Arduino Sketch Folder?? Any idea how I can do it... Thanks for your help 
|
|
|
|
|
14
|
Using Arduino / LEDs and Multiplexing / Bounce tutorial
|
on: March 27, 2011, 09:28:11 am
|
I'm trying to use the code below but when I try to verify it, it says 'Bounce' does not name a type with Bounce bouncer = Bounce( BUTTON, 5 ); highlighted #include <Bounce.h> #define BUTTON 2 #define LED 13 int ledValue = LOW; // This example changes the state of the LED everytime the button is pushed // Build the circuit indicated here: http://arduino.cc/en/Tutorial/Button Bounce bouncer = Bounce( BUTTON, 5 ); void setup() { pinMode(BUTTON,INPUT); pinMode(LED,OUTPUT); } void loop() { if ( bouncer.update() ) { if ( bouncer.read() == HIGH) { if ( ledValue == LOW ) { ledValue = HIGH; } else { ledValue = LOW; } digitalWrite(LED,ledValue); } } }
|
|
|
|
|