Everyone, someway or other has heard about smart devices, Internet of Things and devices that is transforming everything around us. To learn and tinker with it , is like going back to old school for the love of electronics.
Arduino needs no introduction and has the best community backed projects to control, interact and automate physical and digital world. Blynk on the other hand is a platform to control Arduino, Raspberry and the likes of it over Internet.
Blynk is now becoming bigger than originally planned. It is becoming more of an IoT hub than just an app. You can read more of this in their Kickstarter page.
In this post, I will guide users on the journey when using Arduino and Blynk in their first project.The First Project — Control on-board LED
There are only 3 steps to running a Blynk project.
The simplest project in Arduino that one could learn is to control the on-board LED via Sketch. In our example, we will use a smartphone to control the same on-board LED via the Blynk app.
- After logging into the app either via a new account or with your Facebook account, you will see
3. Tap New project to Create a New Project and choose your device, connection type and tap Create.
This will send a Auth Token to your registered email address. You will need this to connect the App with the device.
4. Once ready, add widgets from the widgets box to start creating your project.
As per the team, Blynk runs on Energy indicated by the battery. For new accounts, you get 2000 energy points and when you run out of energy you can buy more.
5. For this example, we will use a Button widget and call it Switch with its output pin selected as Digital D13.
6. Now head over to the Blynk examples site and make your selection as per what you chose in the app to generate the code and upload to your device. Add your Auth Token to complete the code.
- Blynk Libraries are to be installed manually. Download the latest release .zip file from Github.
- Unzip this file and copy all contents to the Libraries folder of the Arduino IDE.
- Devices need to talk to Blynk Cloud to run the instructions.
- Create a new Sketch and paste the example code to write to the device. Ensure the Device, its connection type is selected appropriately.
4. In our example using USB as the connection type, you will need to ensure the device is able to connect to the Blynk Cloud by running a server script.
5. For Windows users, you can run the blynk-ser.bat with the correct COM port as per the instruction here.
6. Once the script is ready, you can now run the project by clicking on the play icon.
7. You will now see the message that the project is connected and that your device is now ready.
8. Once the project is running, the switch label is changed to OFF. Tap the button to see the LED turning ON and OFF every time you change its state.
Congratulations on completing your first project. This is the simplest project I could think to encourage beginners to start using with what minimum they have — Arduino+Blynk.
Happy to get your comments to write more on such topics.