Created
August 27, 2018 13:44
-
-
Save e-Gizmo/0fe09eff0f3a517413e93c0af3a61f16 to your computer and use it in GitHub Desktop.
This file contains 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 characters
/* | |
Poor's Man Oscilloscope Arduino Skecth | |
This is an example code for reading the | |
analog input and to display the value | |
signal output on processing. | |
*/ | |
#define ANALOG_IN 0 | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
int val = analogRead(ANALOG_IN); | |
Serial.write( 0xff ); | |
Serial.write( (val >> 8) & 0xff ); | |
Serial.write( val & 0xff ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment