Show Posts
Pages: [1]
1  Using Arduino / Microcontrollers / Re: Updating DFU on Arduino Uno SMD v3 on: Today at 09:47:55 pm
If you have another Arduino, you could use that as Arduino as ISP programmer.

Sadly, I don't. Is there any way to do it through only the USB cable?
2  Using Arduino / Microcontrollers / Updating DFU on Arduino Uno SMD v3 on: September 18, 2014, 06:49:33 pm
My arduino stopped working, and for the past few hours I've been trying to reload the firmware. I have the hex file, and it's too big for atmel flip, and I can't figure out how to program it through the USB cable using AVRDude. Are there any other options that don't involve buying an ISP programmer thing?
3  Using Arduino / Programming Questions / Re: I need help with States and buttons in my code on: January 09, 2013, 08:10:54 pm
Ok, I redid a bunch of things based on what I was told by you guys, and this is the result:
Quote
#include <Bounce.h>

int ledPins[] = {2,3,4,5,6,7,8,9,10};
int buttonPin = 11;
int buttonPushCounter = 0;
int buttonState = 0;
int lastButtonState = 0;

void setup()
{
  for(int i = 0; i < 9; i++){
  pinMode(ledPins, OUTPUT);   }
  pinMode(buttonPin, INPUT);
}
  
void loop()
{
  buttonState = digitalRead(buttonPin);
  digitalRead(lastButtonState);
  if (buttonState == lastButtonState) {
    buttonPushCounter++;
  }
  else {}
  if (buttonPushCounter == 1) {
//program 2
  }
  else {
//program 1
  }
}

and it still doe'n't work.
I honestly don't know how to make all this work as I am noobish at programming.
And Larry, I thought including the bounce library fixed that?
4  Using Arduino / Programming Questions / I need help with States and buttons in my code on: January 08, 2013, 09:01:40 pm
I have a 3 x 3 led matrix with my led pins 2-10 and a button on 11, and variable resistor on Analog 0. I am trying to fit 5 programs into one, and it switches between them on a button press. this is my code so far:
Quote
#include <Bounce.h>

int ledPins[] = {2,3,4,5,6,7,8,9,10};
int buttonPin = 11;
int buttonPushCounter = 0;
int buttonState = 0;
int lastButtonState = 0;

void setup()
{
  for(int i = 0; i < 9; i++){
  pinMode(ledPins, OUTPUT);   }
  pinMode(buttonPin, INPUT);
}
  
void loop()
{
  buttonState = digitalRead(buttonPin);
  if (buttonState == lastButtonState) {
    if (buttonState = HIGH) {
  buttonPushCounter++;
//program 1
  } }
  else {
//program 2
  }
}


my program will only switch to the second program when the button is held down, and i don't know how to add my other 3. Please help me!
Pages: [1]