Hi! I'm working through some of the basic get-toes-wet steps to maple development, and wrote a limited version of the main.cpp.example to test ADC reading.
However, my code causes the maple to no longer mount as /dev/ttyACM (hi from Debian).
I've read over main.cpp.example many times but can't seem to pin it down. What relevant code am I missing?
Here's mine as sample:
#include "wirish.h" #define BAUD 9600 void print_adc(uint8 pin); void print_adc(uint8 pin){ int sample = analogRead(pin); SerialUSB.print(sample, DEC); } void setup() { //use pins 15-18 for ADC testing pinMode(15, INPUT_ANALOG); pinMode(16, INPUT_ANALOG); pinMode(17, INPUT_ANALOG); pinMode(18, INPUT_ANALOG); } void loop(){ while (SerialUSB.available()) { uint8 input = SerialUSB.read(); SerialUSB.println(input); switch(input) { case 'p': for(int i = 15; i < 19; i++) { print_adc(i); } break; } } } int main() { setup(); while (1) { loop(); } return 0; }