Last active
September 12, 2016 18:29
-
-
Save dwblair/08c50c047951a15cad47a17bb4d34ced to your computer and use it in GitHub Desktop.
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 characters
#include <SoftModem.h> | |
SoftModem modem = SoftModem(); | |
void setup() { | |
Serial.begin(9600); | |
Serial.println("Booting"); | |
delay(100); | |
modem.begin(); | |
} | |
int a; | |
void loop() { | |
a = analogRead(A0); | |
String str=String(a); | |
int str_len = str.length() + 1; | |
// Prepare the character array (the buffer) | |
char char_array[str_len]; | |
// Copy it over | |
str.toCharArray(char_array, str_len); | |
Serial.println(char_array); | |
modem.write(char_array, str_len); | |
//a=a+1; // wraps at 32000 | |
delay(100); // 50 is too fast | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://publiclab.github.io/webjack/examples/
pin 3 to sleeve, via voltage divider (two 10K resistors)
ground to tip
ground of voltage divider to tip