Shop OBEX P1 Docs P2 Docs Learn Events
whiskers and piezospeaker — Parallax Forums

whiskers and piezospeaker

bmcnichobmcnicho Posts: 40
edited 2016-10-24 16:06 in Learn with BlocklyProp
I assigned the following for homework:

Write a program that:
1. Makes a low tone if the left whisker is pressed
2. Makes a high lone if the right whisker is pressed
3. Makes a medium tone if both whiskers are pressed
4. Does nothing if neither whiskers are pressed.

The high and low tones work, but when both whiskers are pressed at the same time it reads it as either only the left or only the right. I tested it with TestWhiskers.bs2 and when I run that it displays 0's when both whiskers are pressed. RoamingWithWhiskers also runs correctly. So the circuit is correct, but I can't figure out why the code isn't working.

Please help! I'm attaching one of the kid's assignment.
Sign In or Register to comment.