Hello everyone,
I try to add some feedback to one of my touch surfaces and using an vibration motor, similar to this project. I soldered everything to a board and connected it via jumper wires. I dont think the board provides additional information but maybe there is a hardware error I am not seeing
Here is my Problem: The code is uploaded correctly and runs, but after every 'vibration' the serial port is disconnected and I hear the disconnect sound of the system, but no reset is initiated. I increased the delay time of the setup and shorten the frequency of the vibration. If there was a reset the vibrations would be longer apart, but there is an impulse every 1000ms (instead of 5000ms waiting time).
#include <Arduino.h>
//#include <MPR121.h>
//#include <MPR121_Datastream.h>
//#include <Wire.h>
//#include <Logger.h>
bool DEBUGLOG = true;
const uint32_t BAUD_RATE = 9600;
uint8_t motorPin = 3;
void setup() {
Serial.begin(BAUD_RATE);
pinMode(motorPin, OUTPUT);
// Logger::log("--- G08 ---");
Serial.println("--- G08 ---");
delay(5000);
// Logger::log("--- start ---");
Serial.println("--- start ---");
}
void loop() {
// Logger::log("ON");
Serial.println("ON");
digitalWrite(motorPin, HIGH);
delay(100);
// Logger::log("OFF");
Serial.println("OFF");
digitalWrite(motorPin, LOW);
delay(1000);
}
I had some issues with other devices when they drew too much current and the devices reset, but since there is no 'odd' behavior in the main_loop I doubt there is hardware error. When I disconnect Pin_3 the program and the serial monitor runs normal.
Had anyone similar experiences?