Introduction: WithYou on Boltiot Platform
I have a friend who makes greeting cards, scrapbook and some extraordinary gifts by her own she will make everything in a creative manner (to see Click here). and you can follow her on FB in "Creative Crissy" page.
some people will buy them for some occasions like Birthdays, marriages and so on.....
Then I got an idea that if the gift has some advanced future which is linked with IoT.Then by the Bolt Unit and the bolt team helps me to do this, you can get the device by Clicking here.
Everyone will give gifts to share their feelings so I thought if they share their little feeling to other it makes each other to feel that they are with their lovable person.
And if there is any emergency occurred then by one click the other person will get alerted by msg.
Step 1: Components Used:
2)Battery's
3)Arduino UNO
4)LCD display
5)Smile Board
6)LED strips (which works on DC voltage)
7)Bolt Shield
8)Jumper Wires
9)Switch
10)10k ohm potentiometer
11)220 ohm resistor
12)Bread Board
Step 2: Bolt Unit
Bolt is an electronic device which has an inbuilt nature of connecting to the internet using ESP8266 and It works on a 5v power supply.
The device will connect to the near wifi router or mobile hotspot to access the internet. We can make it connect to the specific wifi using "Boltiot app" it is available in both the play store and app store. By that, we can control this device remotely using the Internet.
Bolt has many futures like data visualization, controlling and reading data from the sensors to see them Click here.
It can also communicate to other microcontrollers using UART communication.
Step 3: Connecting Arduino UNO With Lcd Display
By seeing the pic we can connect the LCD with Arduino UNO.
Step 4: Connecting Arduino UNO With BoltShield and Programming
We will connect Arduino to bolt shield to control the IC's, this will control(ON/OFF) the LED strips.This is works as H-bridge.
BoltShield --- Arduino UNO
1)0 pin - 6 pin
2)2 pin - 7 pin
3)3 pin - 8 pin
4)4 pin - 9 pin
5)5pin - 10 pin
6)6 pin - 13 pin
And upload the below program in the Arduino UNO.
Attachments
Step 5: LED Strips Connection
To make on the Led strip it should get +ve and -ve connection so by changing the state of the pins of the boltshield from the Arduino UNO we can supply or we can stop by that we can controll the led strips remotely.
Step 6: App for WithYou
the features of the app are to chat with each other and control the box remotely from the app and sending the msg if there is any emergency by one click and we can send the location to the other person.
To make a chat app e need the database for that we will take the database from the firebase
to make it Click here.
And to control the device from the app we use the link of the boltiot which has API key and Device Name.
Step 7: WithYou App Screen1
In the button of the take care in the app, there is a link which connects the device to our app.
This is work on the UART communication protocol.
to start the UART communication first we need to start the communication for that
we have to use the link
"http://cloud.boltiot.com/remote/Yourapikey/serialBegin?baud=9600&deviceName=BOLTxxxxxx"
This will start the UART communication with the baud rate 9600 and for communicating with the Arduino uno, the baud rate should be 9600.
Step 8: WithYou App Screen2
and in every button we will send the data from bolt to Arduino, for that
in the text box of the button we will give the link
"htp://cloud.boltiot.com/remote/Yourapikey/serialWrite?data=Netural&deviceName=BOLTxxxxxx".
in every button, we have to change the data
like
"htp://cloud.boltiot.com/remote/Yourapikey/serialWrite?data=Smile&deviceName=BOLTxxxxxx"
"htp://cloud.boltiot.com/remote/Yourapikey/serialWrite?data=Crazy&deviceName=BOLTxxxxxx"
Step 9: WithYou App Screen3 and Getting Msg
In the button, we will give the link
"htp://cloud.boltiot.com/remote/YourApiKey/digitalWrite?pin=0&state=LOW&deviceName=BOLTxxxxxx"
In the screen3 initialization, we will give the link
"htp://cloud.boltiot.com/remote/YourApiKey/digitalWrite?pin=0&state=HIGH&deviceName=BOLTxxxxxx"
and to get the msg we need a separate server we will get it from the digital ocean
Click here to create the digital ocean account and you will be credited with 10$ in your digital ocean account.
and to getting the msg we use Twilio
Click here to know how to get msg from the Twilio
and use the below program to get the msg when the alert has been came
from twilio.rest import TwilioRestClient
from credentials import account_sid, auth_token, my_cell, my_mobile
import requests,json,time
client = TwilioRestClient(account_sid, auth_token)
def send_msg(sensor_data):
my_msg = "I'm in problem"
message = client.messages.create(to=my_cell, from_=my_mobile, body=my_msg)
while True:
r = requests.get('http://cloud.boltiot.com/remote/api_key/digitalRead?pin=A0&deviceName=BOLTXXXXXX')
data = json.loads(r.text)
print data['value']
try: sensor_value = int(data['value'])
print sensor_value if sensor_value == 1:
send_msg(str(sensor_value))
except Exception as e:
print "Error",e
time.sleep(5)
Run this on your server. This will trigger when the alert has been pressed.

Participated in the
Invention Challenge 2017
Comments