Skip to content

Instantly share code, notes, and snippets.

@e-Gizmo
Created August 27, 2018 13:44
Show Gist options
  • Save e-Gizmo/0fe09eff0f3a517413e93c0af3a61f16 to your computer and use it in GitHub Desktop.
Save e-Gizmo/0fe09eff0f3a517413e93c0af3a61f16 to your computer and use it in GitHub Desktop.
/*
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