Skip to content

Instantly share code, notes, and snippets.

@chrismeyersfsu
Created August 6, 2012 04:22
Show Gist options
  • Star 28 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save chrismeyersfsu/3270358 to your computer and use it in GitHub Desktop.
Save chrismeyersfsu/3270358 to your computer and use it in GitHub Desktop.
Arduino Poor man's oscilloscope
#define ANALOG_IN 0
void setup() {
Serial.begin(9600);
//Serial.begin(115200);
}
void loop() {
int val = analogRead(ANALOG_IN);
Serial.write( 0xff );
Serial.write( (val >> 8) & 0xff );
Serial.write( val & 0xff );
}
@tcedar
Copy link

tcedar commented Apr 7, 2019

Thanks @stephanmantler , that's really helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment