@Lichtsignaal my wife is a bit of a gamer and she wasn’t very impressed. She thinks I should be working, not designing games. It came about when I started playing with Blynk’s new Set Property feature and the blinking LED’s reminded me of the old Simon game.
There is a version of Simon available for Smartphones and I noticed the Android version alone has between 1,000,000 and 5,000,000 downloads.
It might take us some time to integrate WiFi Manager into the project so if anyone wants to “beta test this exceptional engineering application” (spouse speak for play the game) send us the following details by private Community message once you have loaded up the project on your Smartphone:
Your Blynk Token
Your Router SSID
Your Router Password.
Your local server IP or confirmation you are using Blynk’s cloud server.
ESP WiFi connections only at this stage, none of that “shield” nonsense.
So the plan is to allow users to be able to connect to 4 different servers to play the game. Perhaps Blynk’s cloud server and up to 3 local servers. We still have some coding to do for this but it should be a simple set of 4 IF statements, working through the tokens and IP addresses. Obviously users will still need to change the server settings in the app manually as they move from location to location. This is fairly straightforward when you have done it a few times.
One tip we would give is to use the same email address and password on each server you access and then you are not wasting time changing them in the app.
Also at this stage we are not looking to add a further 8 parameters to WiFi Manager for 4 SSID’s and 4 passwords so we expect the user to use the same access details wherever they are i.e. ensure all SSID’s and password are identical at the wireless Access Points you use.
It wouldn’t be difficult to add these extra parameters but we think with app’s like ESP Connect you should be able to change the access details on the fly from your Smartphone. Ken Taylor’s branch of WiFi Manager allows you to leave the SSID and Password fields blank and it will use the details you already have in the ESP. So it is just the Blynk token and server details that need to be updated and verified with WiFi Manager.
This is our Serial Monitor having intentionally set the wrong Blynk cloud server token in WiFi Manager. You will see it tries to connect to the Blynk server a couple of times and then it moves on to our local Pi Zero server and connects.
Local ip: 192.168.10.97
WiFi connected with IP address: 192.168.10.97
[1169] Blynk v0.3.8 on ESP8266
[5001] Connecting to blynk-cloud.com:8442
[5201] Invalid auth token
[10202] Connecting to blynk-cloud.com:8442
[10375] Invalid auth token
[13170] Blynk v0.3.8 on ESP8266
[15376] Connecting to 192.168.10.229:8442
[15693] Ready (ping: 11ms).
[20694] Connecting to 192.168.10.229:8442
[20726] Ready (ping: 12ms).
Connected to local server
ESP MAC is 5C:CF:7F:8B:28:E2
pinSda = 2
[21819] Time sync: OK
Date is: 04/09/2016 and the time is now 21:14:16
[22805] Time sync: OK
Below is an extract from our setup() which creates the Serial Monitor output above, hope you find a use for it.
Serial.print("WiFi connected with IP address: ");
Serial.println(WiFi.localIP());
if(pinSda > 1){ // this is just a test to say if pinSda in WiFi Manager is set to > 1
// sketch will try a few connections, in the order they were put in WiFi Manager
Blynk.config(blynk_token1, blynk_server1); // Blynk Cloud Server
int mytimeout = millis() / 1000;
while (Blynk.connect() == false) { // try to connect to server for 10 seconds
if((millis() / 1000) > mytimeout + 8){ // try local server if not connected in 9s
// assume local server success if Blynk cloud failed
strcpy(connectionStatus, "Connected to local server");
// failed to connect to Blynk cloud server so try local server
Blynk.config(blynk_token2, blynk_server2); // Local Server access details
mytimeout = millis() / 1000;
while (Blynk.connect() == false) { // try to connect to server for 10 seconds
if((millis() / 1000) > mytimeout + 8){ // try for less than 9 seconds
break; // blynk.run() will kep trying to connect
}
}
}
}
}
Specifically can you try the shared project QR code at the bottom of the README and let us know how it goes. Specifically interested in feedback from iPhone users but Android feedback is also very welcomed.
Hope to have the bin file uploaded and the section relating to esptool.py completed before morning.
If you think that’s funny, take a look at mine! I’ll try to get you some feedback tomorrow (when my phone is recharged). I can also charge my iPhone and see how that goes.
I just “saw” a game run on my phone from an anonymous player with a less than impressive score of minus 66. So something appears to work even if it is a bit flakey at the moment.
@Costas, thanks for sharing! This could be the first competition between Blynkers!
I’m trying to use the project sharing feature without luck, “your Esp was disconnected” every few seconds…
That might be because there are over 500,000 people trying to play the game at the same time
My internet connection has been a bit flakey today too. This websites and others were taking forever to load up.
Currently the Wio Link is plugged into a USB power bank that I only got about 60 minutes ago and it’s not charged up but it is plugged into the mains. I will try direct mains power to the Wio to see if that helps.
Just uploaded the bin to GitHub so it is available for download now.
I have just downloaded it myself and will knock up the notes for esptool.py shortly. Some people will be able to flash the bin without any notes but one way is to flash a basic local OTA update, browser version, sketch to your ESP with Arduino IDE and then select the downloaded bin file.