Project tutorial
How to Add an LED with Blynk on Linux

How to Add an LED with Blynk on Linux © CC BY-NC-SA

An LED that will be on or off , using a button from Blynk.

  • 1,904 views
  • 2 comments
  • 5 respects

Components and supplies

Apps and online services

About this project

Hi! My name is Matei. I'm eleven years old and I love Arduino.

In this project, I will activate an LED with Blynk on Linux. First, you will need to install Blynk on your phone. Open the Blynk app, log in or sign up, then create a project.

Auth Token

I attached a video to explain how to get the auth token.

The auth token will be sent at the email that you log in or sign up

Then visit http://www.blynk.cc/getting-started/ to get the library for Blynk. In Arduino>File>Examples, you will see a example called Blynk:

Now you must upload Arduino_Serial_USB, and where it said "YourAuthToken" you will replace with your project's auth token (e.g., 3c37e93440b04319b8d0b). We open a terminal, and now we must find blynk-ser.sh that will help us connect to the Blynk server. In the terminal, we will run the command that finds the file called blynk-ser.sh which is ''find / -name blynk-ser.sh 2>/dev/null''.

Then we will copy the location of blynk-ser.sh. And we will give the terminal another command: "cd" (change directory); and then we will paste the location.

Now we can give the terminal the command "./blynk-ser.sh" and it will run the program.

Blynk

Now we enter in Blynk app and we create our project.

We press on the screen and we will enter in the widgets menu.

Now we are in the project menu and it must look like this:

We press on the button and configure it. I put the LED on pin D12. From "push" we will configure to "switch".

Now we return to project menu and we will press "play" button.

The device must be online:

Result

Donations: https://www.paypal.me/princematthew ( support is really appreciated😃)

Code

Arduino_Serial_USBC/C++
/**************************************************************
  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.
    Downloads, docs, tutorials: http://www.blynk.cc
    Blynk community:            http://community.blynk.cc
    Social networks:            http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app
  Blynk library is licensed under MIT license
  This example code is in public domain.
 *************************************************************
  This example shows how to use ordinary Arduino Serial
  to connect your project to Blynk.
  Feel free to apply it to any other example. It's simple!
 *************************************************************
             USB HOWTO: http://tiny.cc/BlynkUSB
 **************************************************************/

// 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
  // Do not read or write this serial manually in your sketch
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
}

void loop()
{
  Blynk.run();
}

Comments

Similar projects you might like

Controlling LED Using Blynk

by Patel Darshil

  • 5,144 views
  • 0 comments
  • 13 respects

How to read temperature and humidity on Blynk with DHT11

Project tutorial by Tech with Matthew

  • 10,711 views
  • 3 comments
  • 14 respects

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 17,295 views
  • 4 comments
  • 34 respects

4x4x4 LED cube with Arduino Uno and 1sheeld

Project tutorial by Hassan Ibrahim

  • 29,722 views
  • 6 comments
  • 60 respects

LED Emergency Lights using WS2812 RGB LED Module

Project tutorial by bigboystoys13

  • 10,004 views
  • 5 comments
  • 20 respects
Add projectSign up / Login