🐍 CircuitPython is the easiest way to program microcontrollers now celebrating over 200 boards!🐍
0

A simple web toggle switch for IOT
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

A simple web toggle switch for IOT

by calebbabin on Sat Jul 04, 2015 12:17 pm

Being a web developer with to much time on my hands and an arduino, I created the most simple web interface for an arduino or raspberry pi that I could think of!

http://calebbabin.com/switch/#

Basically this is a switch that uses AJAX to submit data to a PHP file every time that its clicked, and if someone else opens the button in their browser and clicks it, it will also move on your browser (open it on your phone and desktop at the same time to see it working).

You could also have your arduino or what have it send a 1 or 0 back to the server using GET (IE instead of example.com/button/ it would be example.com/button/?data=1) and the switch in your browser will animate as well!

Right now I have an arduino YUN connected to the internet over wifi checking the installation on my website and turning a red indicator LED on when the switch is up and off when its down.
Last edited by calebbabin on Sat Jul 04, 2015 6:42 pm, edited 1 time in total.

calebbabin
 
Posts: 1
Joined: Sat Jul 04, 2015 12:06 pm

Re: A simple web IO for arduino

by adafruit_support_bill on Sat Jul 04, 2015 1:04 pm

Cool! Thanks for posting.

adafruit_support_bill
 
Posts: 80840
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.