Created
March 15, 2016 14:16
-
-
Save lorenrogers/215258b0573e3e2d46c9 to your computer and use it in GitHub Desktop.
Revisions
-
Loren Rogers created this gist
Mar 15, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ long randomvalue = 0; long countervalue = 0; int serialvalue; int started = 0; void setup() { Serial.begin(9600); } void loop() { if(Serial.available()){ serialvalue = Serial.read(); started = 1; } if (started) { randomvalue = random(1000); Serial.print(countervalue); Serial.print(" "); Serial.print(randomvalue); Serial.print(" "); Serial.print(serialvalue); Serial.println(); countervalue = (countervalue +1) % 1000; delay(100); } }