Hello everyone,
When I uploaded a new script to my nano sense I can't connect it anymore to my PC. It connects really quick and immediatly disconnects.
Does anyone know how to fix this?
BTW this is the small script I uploaded. I fear the arduino crashes because of the array or something.
int rotarySensorPin = D2;
int val = 0;
long unsigned int timer = 0;
String sensorValues[10000];
void setup() {
Serial.begin(9600);
pinMode(rotarySensorPin, INPUT);
}
void loop()
{
for (int i = 0; i <= 9999; i++)
{
val = digitalRead(rotarySensorPin);
timer = millis();
sensorValues[i] = val + "," + timer;
Serial.println(sensorValues[i]);
}
}