By Daniel Du
Internet of Things(IoT) is more and more popular these days, and Autodesk is also heading to IoT by acquiring the leading IoT company – SeeControl. As my very first step, I’ve been playing with Arduino and have a lot of fun.
knowing nothing about hardware stuff, Arduino Starter Kit is good place to start for me, it includes Arduino and some necessary commonly used sensors.
Getting started with Arduino
To start, I will need an Arduino board, breadboard, some sensors and some connection wires. You can buy a Arduino Starter Kit to start.
I also need Arduino IDE, which is an integrated development environment, enables us to write some code and upload then to Arduino to run. It has Windows version, Linux version and Mac version. I am using Mac version. Currently the latest version is 1.6.5
https://www.arduino.cc/en/Main/Software
To run my very first Arduino app, we can start from the Blink example, it Turns on an LED on for one second, then off for one second, repeatedly.If you want to have a try, once you installed the Arduino IDE, you can find the sample from File – Examples.
Before running it, we need setup the hardware. Connect Arduino and my laptop with USB cable, upload the sample from Arduino IDE by clicking the second arrow button. You will see the little LED beside 13 pin on Arduino board is splashing. This is also a test program to verify whether your Arduino board is good or not.
Do not have Arduino yet? Try 123D Circuits
You may not understand what I am saying about because I did not put a picture or a video as I do not have my devices with me at the time of writing. But you want to try it yourself, right? Are you thrilled to have a try but have not get Arduino yet? Actually you do not have to, try Autodesk 123D Circuits, you can do the hardware simulation, coding online in 123D Circuits and share your work among communities.
Here is the simplest Blink hardware lab view. I put a LED on the breadboard, connect its leg to 13 pin on Arduino with the blue wire. And then connect its another led to 5V pin on Arduino with a red wire. It is that simple, but wait, I’d better to put a resistor between them, otherwise the LED may be exploded since the voltage is too high.
Once I am done, I can press “Start Simulation” from top right or “Upload & Run” from the code editor on the bottom to run the test code.
Please note that the Arduino code is the default blink code as below, if it is not, you need to copy and paste it into code editor before you upload and run:
// Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
Now you should be able see the LED is blinking.
My next job is put on a LM35 temperature sensor to get current temperature and show the value out. I will blog it next time.
Before you get your Arduino shipped, you can play with Autodesk 123D Circuits, and there are quite a lot videos on YouTube to demo how to use it.
Have fun!
Comments
You can follow this conversation by subscribing to the comment feed for this post.