Connect Arduino over USB to local server

Hi
I’ve installed the local Blynk server on Raspbian and it works well

I’m using Arduino UNO via USB.
I can connect easily to the blynk server, but I can’t connect to the local server

When I try to compile the Sketch I get different errors
Blynk.begin(auth, serial, IPAddress (192,168,1,111));
gives this error

Arduino_Serial_USB:50: error: ‘serial’ was not declared in this scope

Blynk.begin(Serial, auth, IPAddress(192,168,1,111));
gives another error
‘IPAddress’ was not declared in this scope

What am I doing wrong?

Thank you

The key is in how you are connecting… In your case, since using USB, you make your adjustments in the USB script, not the sketch

for example… in blynk-ser.bat for Windows…

@echo off
setlocal EnableDelayedExpansion

REM === Edit these lines to match your need ===

set COMM_PORT=COM4
set COMM_BAUD=9600
set SERV_ADDR=xxx.xxx.xxx.xxx
set SERV_PORT=8442

http://help.blynk.cc/how-to-connect-different-hardware-with-blynk/arduino/usb-serial

1 Like

Thank you
I think this is the solution
I will try it asap

Thnak you
It wokrs