File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
examples/Switch/Switch_Test Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- Switch_Interrupt
2+ Switch_Test.ino - Example for the WHSR library
33
44 This example for the Westphalian University's WHSR lerning robot shows how to
55 read out the value of the switch of the robot. It is also used to check which
@@ -23,15 +23,18 @@ void setup()
2323
2424void loop ()
2525{
26- // Communicate value
26+ // Get joint value of all switches
2727 int switchvalue = robo.readSwitches ();
2828
29- // Print switch input value in binary form, should show a 1 for each pressed switch
30- // This is not compatible with the Arduino Nano 33 BLE.
29+ // Print switch input value in binary form, should show a 1 for each pressed switch
30+ // This does not yet work properly on the Arduino Nano 33 BLE.
3131 Serial.print (switchvalue, BIN);
32+
33+ // Print switch input value in decimal form
3234 Serial.print (" (" );
3335 Serial.print (switchvalue);
3436 Serial.println (" )" );
3537
36- delay (100 ); // Pause for 100 milliseconds
38+ // Pause for 200 milliseconds
39+ delay (200 );
3740}
You can’t perform that action at this time.
0 commit comments