Pulse and Mix [Garrett Nickerson]

I figured out my problems! This assignment will be up soon…

Advertisements

~ by Garrett Nickerson on February 18, 2010.

3 Responses to “Pulse and Mix [Garrett Nickerson]”

  1. I am not sure what exactly is wrong, but I am not sure you can write these statement:

    int redswitchState=digitalRead(redSwitch);
    int greenswitchState=digitalRead(greenSwitch);

    before the void setup. Maybe you can try:
    int redswitchState;
    int greenswitchState);
    and putting in the void loop:

    redswitchState=digitalRead(redSwitch);
    greenswitchState=digitalRead(greenSwitch);

    See if that works. If not, you can get rid of the redswitchState and greenswitchState and replace them with digitalRead(redSwitch).
    so like if(digitalRead(redSwitch)==HIGH)

    I hope that helps

  2. I think you want:

    if(redswitchState == HIGH && greenswitchState == HIGH)
    ( redCount=0;
    greenCount=0;}

    • Did you just add that parentheses? Or did you mean put the dual pin segment at the end so that I can put } after? It doesn’t like the parentheses…

      I fixed the switchState placement, but it still doesn’t work.

      Also, I know the circuit I built is correct because it works with other people’s codes.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: