If you don't have any shield and your hardware doesn't have any connectivity, you can still use Blynk – directly over USB :
-
Open Arduino Serial USB example and change Auth Token
// You could use a spare Hardware Serial on boards that have it (like Mega) #include <SoftwareSerial.h> SoftwareSerial DebugSerial(2, 3); // RX, TX #define BLYNK_PRINT DebugSerial #include <BlynkSimpleStream.h> // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YourAuthToken"; void setup() { // Debug console DebugSerial.begin(9600); // Blynk will work through Serial Serial.begin(9600); Blynk.begin(auth, Serial); } void loop() { Blynk.run(); }
-
Run the script which is usually located in
/scripts
folder:- Windows:
My Documents\Arduino\libraries\Blynk\scripts
- Mac
User$/Documents/Arduino/libraries/Blynk/scripts
- Windows:
On Windows:
Open cmd.exe
Write your path to blynk-ser.bat folder. For example:
cd C:\blynk-library-0.3.1\blynk-library-0.3.1\scripts
Run blynk-ser.bat
file. For example : blynk-ser.bat -c COM4
(where COM4 is port with your Arduino)
And press "Enter", press "Enter" and press "Enter"
On Linux and Mac:
Navigate to /scripts folder. For example:
cd User$/Documents/Arduino/libraries/Blynk/scripts
When inside this folder, run:
user:scripts User$ ./blynk-ser.sh
Warning: Do no close terminal window with running script.
In some cases you may also need to perform :
user:scripts User$ chmod +x blynk-ser.sh
You may need also to run it with sudo
user:scripts User$ sudo ./blynk-ser.sh
This is what you'll see in Terminal app on Mac (usbmodem address can be different):
[ Press Ctrl+C to exit ]
/dev/tty.usbmodem not found.
Select serial port [ /dev/tty.usbmodem1451 ]:
Copy the serial port address: /dev/tty.usbmodem1451
and paste it back:
Select serial port [ /dev/tty.usbmodem1451 ]: /dev/tty.usbmodem1451
After you press Enter, you should see an output similar to this:
Resetting device /dev/tty.usbmodem1451...
Connecting: GOPEN:/dev/tty.usbmodem1451,raw,echo=0,clocal=1,cs8,nonblock=1,ixoff=0,ixon=0,ispeed=9600,ospeed=9600,crtscts=0 <-> openssl-connect:blynk-cloud.com:9443,cafile=/Users/.../server.crt,nodelay
2015/10/03 00:29:45 socat[30438.2046857984] N opening character device "/dev/tty.usbmodem1451" for reading and writing
2015/10/03 00:29:45 socat[30438.2046857984] N opening connection to LEN=16 AF=2 45.55.195.102:9443
2015/10/03 00:29:45 socat[30438.2046857984] N successfully connected from local address LEN=16 AF=2 192.168.0.2:56821
2015/10/03 00:29:45 socat[30438.2046857984] N SSL connection using AES128-SHA
2015/10/03 00:29:45 socat[30438.2046857984] N starting data transfer loop with FDs [3,3] and [4,4]
NOTE: Arduino IDE may complain with "programmer is not responding". You need to terminate script before uploading new sketch.
Additional materials:
- Tutorial: Control Arduino over USB with Blynk app. No shield required. Mac OS)
- How to control arduino (Wirelessly) with blynk via USB. Windows
- Instructables: Control Arduino with Blynk over USB
-
Connect your Raspberry Pi to the Internet and open it's console.
-
Run this command (it updates your OS package repository to include the required packages):
curl -sL "https://deb.nodesource.com/setup_6.x" | sudo -E bash -
-
Download and build Blynk JS library using npm:
sudo apt-get update && sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install -g npm sudo npm install -g onoff sudo npm install -g blynk-library
-
Run Blynk test script (put your auth token):
blynk-client 715f8cafe95f4a91bae319d0376caa8c
-
You can write our own script based on examples
-
To enable Blynk auto restart for Pi, find
/etc/rc.local
file and add there:node full_path_to_your_script.js <Auth Token>
Additional materials:
- Instructables: Blynk on Javascript for Raspberry Pi, Intel Edison and others
- Instructables: Use DHT11/DHT12 sensors with Raspberry Pi and Blynk
Note: Instead of using Node.js, you can also build a C++ libarry version (same as Arduino, WiringPi-based) installation:
- Library README for Linux
- Blynk Community Topic: How-To Raspberry Pi
- Video tutorial - Setting up Blynk and Raspberry Pi:
You can run Blynk directly on the ESP8266!
Install the latest ESP8266 library for Arduino using this guide.
Example Sketch: ESP8266_Standalone
Additional materials:
- Instructables: ESP8266 ESP-12(Standalone)+ Blynk
- Instructables: ESP8266-12 standalone Blynk lm35 temperature sensor
Step-by-Step Tutorial in Russian language
Please follow this detailed instruction. Or watch this Video tutorial.
This connection type is not recommended for beginners.
If you would like to try it, please carefully read this help topic Note: Some boards like Arduino UNO WiFi from Arduino.org, do not use AT commands (and do not provide relevant libraries), so this renders them unusable with Blynk.
Blynk works with the whole family of Particle products: Core, Photon and Electron
- Open Particle Web IDE.
- Go to the libraries.
- Search for Blynk in the Community Libraries and click on it
- Open
01_PARTICLE.INO
example - Click "use this example"
- Put your Auth Token here:
char auth[] = "YourAuthToken";
and flash the Particle!
You can scan this QR code from the Blynk App and you'll get a ready-to-test project for Particle Photon. Just put your Auth Token into the 01_PARTICLE.INO
example.
Additional materials: