Skip to content

Instantly share code, notes, and snippets.

@dwblair
Last active September 12, 2016 18:29
Show Gist options
  • Save dwblair/08c50c047951a15cad47a17bb4d34ced to your computer and use it in GitHub Desktop.
Save dwblair/08c50c047951a15cad47a17bb4d34ced to your computer and use it in GitHub Desktop.
#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
}
@dwblair
Copy link
Author

dwblair commented Sep 12, 2016

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

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