Vikas Malik
Published © GPL3+

Blynk with Onion Omega2p: Buttons, LED, LCD, Virtual Display

This project demonstrates how to use the various features of Blynk like Buttons, LED, LCD, Virtual Display with Onion Omega2p.

BeginnerFull instructions provided30 minutes3,473
Blynk with Onion Omega2p: Buttons, LED, LCD, Virtual Display

Things used in this project

Hardware components

Omega2 Plus
Onion Corporation Omega2 Plus
×1
Breadboard (generic)
Breadboard (generic)
×1
LED (generic)
LED (generic)
×1
Resistor 221 ohm
Resistor 221 ohm
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Blynk
Blynk

Story

Read more

Schematics

Led in Off state

Omega2p connection with Led & resistor. Shows the Led in Off state when Digital Button on the Blynk app goes in Off state.

Led in On state

Omega2p connection with Led & resistor. Shows the Led in On state when Digital Button on the Blynk app goes in On state.

Blynk App Screenshot on Mobile

The picture shows the arrangement of the different widgets of Blynk on Mobile.

Code

Untitled file

Arduino
var BlynkLib = require('/usr/bin/blynk-library'); 
var blynk = new BlynkLib.Blynk('Auth Token'); // Make sure to replace this with your Auth Token 
var v1 = new blynk.VirtualPin(1); 
var led = new blynk.WidgetLED(2); 
var LCD = new blynk.WidgetLCD(3); 
var v4 = new blynk.VirtualPin(4); 
var flag = 0; 
var num = 255; 
LCD.clear(); 
setInterval((function(){ 
	LCD.print(0,0,"Hello Onion"); 
}),2000); 
v1.on('write', function(param) { 
 console.log('V1:', param); 
}); 
v4.on('read', function() { 
 v4.write(new Date().getSeconds()); 
}); 
setInterval((function(){ 
	if(flag == 0){ 
		this.num = 0; 
		flag = 1; 
	} 
	else{ 
		this.num = 255; 
		flag = 0; 
	} 
	led.setValue(this.num); 
}),2000); 

Credits

Vikas Malik

Vikas Malik

1 project • 0 followers

Comments