Hi there,
Brand new to the world of Blynk and Arduino and having a problem with trying to setup and use a local server for Blynk on a Mac.
This is what I have done so far :
- Downloaded Blynk App to iPhone (iPhone 7 plus running iOS 13.5.1).
- Downloaded latest Blynk server .jar file (server-0.41.13.jar) from GitHub and installed to Mac.
Server is running on Mac and the iPhone (I believe) logs into it as I place the server IP and port (9443) into the login section on the iPhone App and the App logs in so hopefully that part is working?
- Created a very simple App on the iPhone which has 1 button.
- Created a programme for my Arduino board (Wemos D1 Mini). Code for which is shown below :
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "My WiFi Network Name";
char pass[] = "xxxxxxxx";
// This function will be called every time Slider Widget
// in Blynk app writes values to the Virtual Pin V1
BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
Serial.println(pinValue);
// process received value
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,82));
}
void loop()
{
Blynk.run();
}
N.B. The SSID, password and Auth key above are filled out in the Arduino IDE with the correct details. Just shown as above for examples.
The code uploads fine to the board but if I then watch the serial monitor I get this come up :
⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮Hl⸮k⸮d,⸮⸮4h`:⸮[64] Connecting to My WiFi Network Name
[567] Connected to WiFi
[567] IP: 192.168.1.249
[568]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.6.1 on ESP8266
[641] Connecting to 192.168.1.82
[5641] Connecting to 192.168.1.82
[10642] Connecting to 192.168.1.82
[15643] Connecting to 192.168.1.82
[20644] Connecting to 192.168.1.82
[25645] Connecting to 192.168.1.82
[30646] Connecting to 192.168.1.82
[35647] Connecting to 192.168.1.82
and so on and so forth. Seems that it never connects to the local server?
I’ve tried going to https://192.168.1.82:9443/admin and that works fine and the admin page loads into a browser so that tells me hopefully that the server is up and running correctly?
Also when in the iPhone Blynk App and trying to run the simple App I get the 'Wasn’t online yet" error at the top of the screen.
Not too sure where I’m going wrong so any help with this would be greatly appreciated. I’ve hopefully put all the information needed into this forum post but apologies if I’ve missed something as this is my first foray into all of this.
Many thanks for any help with this.
Best wishes,
Mark