Scratch for arduino: isScratch modification that allows for simple programming of the Arduino open source hardware platform. It provides new blocks for managing sensors and actuators connected to Arduino.
this platform is suitable for a people how want to learn programming without writing a single code line, it's a perfect educational tool.
in this tutorial we will see how to control AC Lamp using scratch and arduino,this is the most simple and safest way to control High voltage.
Step 1: What We Need ?software and Components
For software you need to:
- Download scratch for arduino(compatible with all OS ) from here.
- Download arduino IDEfrom here.
- uploadthis Firmware to your arduino board"Support uno and mega only".
- open S4A on your computer , if your arduino connected to your computer,from scratch right panel you will see random number changing very fast, that's mean your arduino connected successfully with scratch software.
The hardware components you need are:
- Arduino Board"Uno or Mega".
- Sugar device
- AC lamp"any lamp type is Ok".
- RJ12 Cable.
- RJ Breakout.
- Power cable C14.
- Breadboard and solderless jumper.
Step 2: Your First Program
the connection is very simple , you can see the schematic.
and for the Sugar device connection is very easy:
- Connect the lamp to the Output socket
- Connect RJ12 Cable.
- Connect the Power cable.
First program we want to do is a a blink AC lamp.
one picture worth 1000 word, and we provide a lot of images to guide you how to build your first code.
Also we provide a video to show you how to build the code step by step
Step 3: You Love Sugar Device ? We Need Your Help
Sugar is a startup project , designed and Manufactured the Prototypes in Taipei - Taiwan and Now sugar need your help to become a real product in the market and bring a simple tools to control AC voltage.
Sugar comes in 2 different type:
- Sugar300 : can Handle Up to 300 W
- Sugar1000 : can Handle Up to 1000 W
and both type support AC output voltage control "For Dimmer applications"
Hope you support us and become our backer Now on Indiegogo Campaign
, we updated the artical ,you can visit our campaign page https://igg.me/at/sugdev/x . Keep in touch with us on:
Youtube official accounts: https://www.youtube.com/channel/UCDthbcEGR-r0NB49p...
Visit Our website to see all features and tutorial and see the story behind sugar
Step 4: Have More Control
to add some control to the code , we can control the light by clicking on "a" button on keyboard
no change on the connection, all we need to do is add 2 new command , you can see them in the picture.
and the video to illustrate more how to do it.
all the scratch code you need you could find them here as well.