Quantcast
Channel: Sensors - Arduino Forum
Viewing all articles
Browse latest Browse all 1071

I need help with making SpeedStacks timer!

$
0
0

Hi,

I'm trying to make a SpeedStacks timer, with buttons. Right now, it's supposed to print a message to the serial monitor at 9600 baud. It does not work, though. Here's my code:

#include "pitches.h" //library

int red = 12; //rgb led
int green = 11; //rgb led
int blue = 10; //rgb led

int left_touch = 9; //right button for timer
int right_touch = 6; //left button for timer

int reset = 5; //reset button
int pwr = 7; //power button (have issue regarding this)
int save = 8; //save button (to save PBs)

void setup()
{
  pinMode(red, OUTPUT);
  pinMode(green, OUTPUT);
  pinMode(blue, OUTPUT);
  pinMode(left_touch, INPUT_PULLUP);
  pinMode(right_touch, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop()
{
  if (digitalRead(pwr) == LOW)
  {
    Serial.println("TURNED ON");
  }
}

33 posts - 5 participants

Read full topic


Viewing all articles
Browse latest Browse all 1071

Trending Articles