703
edits
(Created page with " Flash your arduino board with following code to have analog values from analog pin A0 reported via serial connection. Extract this zip archive [[File:pd-arduinoOscilloscope.zip]...") |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
Flash your arduino board with following code to have analog values from analog pin A0 reported via serial connection. Extract the following zip archive to a folder [[Media:pd-arduinoOscilloscope.zip]] and open the contained pd patch arduinoOscilloscope.pd to receive the analog values and have a very basic oscilloscope on your computer. | |||
Flash your arduino board with following code to have analog values from analog pin A0 reported via serial connection. Extract | |||
<source lang="c"> | <source lang="c"> | ||
| Line 17: | Line 16: | ||
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) | ||
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) | ||
#define BAUDRATE 1000000 // | #define BAUDRATE 1000000 // 1000000 may not work - use 115200 instead. | ||
int testPin = 7; | int testPin = 7; | ||
| Line 69: | Line 68: | ||
void loop() | void loop() | ||
{ | { | ||
PORTD = PORTD | 128; // Test Output on pin 7 | PORTD = PORTD | 128; // Test Output on pin 7 | ||
PORTD = PORTD ^ 128; // Test Output on pin 7 | PORTD = PORTD ^ 128; // Test Output on pin 7 | ||
} | } | ||
//****************************************************************** | //****************************************************************** | ||
edits