Hi, I am new to creating topics, but have used this community extensively - just reached a point where I have become stuck!! I have searched through other topics and other areas of the web, but others don’t seem to have the same problem as me.
I am using a local server on a raspberry Pi Zero W (headerless and stand alone with connection via wifi ssh) which is linked to an Arduino Mega via USB. I can connect to the server via my mobile device (ipad or iphone) over wifi to the Pi Zero W. But I can no longer connect the Arduino to the server via the USB - I had this working for a very short period but had problems with scripts running at reboot.
I am running blynk-ser.sh and it creates a connection to the server.
Everything seems to be running properly, but the Arduino never connects to the server. It seems that the problem lies in the USB connection from the Arduino to the Pi.
Running “lsusb” through ssh on the pi shows that it is not connected.
I am running the following script on the Arduino. Because the Arduino is connected with its USB port I have disabled the debugging serial to free it up for the connection to the Pi.
/* Comment this out to disable prints and save space */
//#define BLYNK_PRINT Serial
// You could use a spare Hardware Serial on boards that have it (like Mega)
//#include <SoftwareSerial.h>
#include <BlynkSimpleStream.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "XXXX";
void setup()
{
// Debug console
//Serial.begin(9600);
// Blynk will work through Serial
// Do not read or write this serial manually in your sketch
Serial.begin(9600);
Blynk.begin(Serial, auth);
}
void loop()
{
Blynk.run();
}
I have tried the following:
- Different arduino.
- Different USB cable
- Different Pi Zero W (same SD card)
- checked the auth code is correct in the arduino code
Any help would be gratefully received as I am fully out of ideas!