Take the first step in the Internet of things and play the Arduino

Source: Internet
Author: User
Tags autodesk 123d

As you know, the Internet of Things (IoT) is now in the ascendant, with a variety of smart devices, watches, things, even sports shoes and other wearable devices, as well as smart home products, constantly impacting our minds and eyeballs. Autodesk has also recently announced its foray into the IoT industry and has just acquired an internet of things company Seecontrol.

I do not understand the hardware of the people are interested to play a bit, where to start? Let's start with the simplest Arduino. So the mood dash a set of Arduino Starter Kit, this kit contains Arduino board and some common sensors, get started enough.

Getting started with Arduino

First we need an Arduino board, a bread board to plug in the line, there are some led Ah, sensor God. These are all in the kit. But at first, it's easy to play a little bit, so let's start with the environment. In addition to the small hardware, you need to download and install the Arduino IDE. Currently the latest version of the 1.6.5. can be downloaded from the Internet, Windows, Linux, Mac version has. I'm using the Mac version.

Https://www.arduino.cc/en/Main/Software

As a start, let's play the blink example first. This example is to light an LED light, turn it off after 1 seconds, and then cycle through it. The example source code is already in the Arduino IDE and can be found in the file-example. Now dry up, connect the Arduino to the computer with the USB cable, press the upload button inside the Arduino IDE, the button that is the second arrow below. Then pay attention to observe the Arduino board 13th next to a small lamp is already flashing, success! Too simple, in fact, this can also be used as a board good or bad test procedures. You can change the code, such as 22 seconds off 0.5 seconds, and then upload to see what effect.

With this small example, we understand how Arduino works, and we can programmatically control what the Arduino does to achieve the behavior we want.

Does not have an Arduino yet? Try 123D Circuits

You might want to play it too, but you probably don't have the Arduino kit yet. It doesn't matter, you can try Autodesk 123D circuits first. This is a pure web version, on the Autodesk 123D circuits you can simulate the hardware connection, writing and testing code, and so on, your Arduino also arrived, the code directly to the Arduino IDE to burn into the Arduino can be perfectly run, Ha ha. You can also share your results with your Autodesk 123D circuits to your friends for fun.

First sign in to Autodesk 123D circuits and create a lab. There is only one breadboard on the inside, dragging an Arduino and an LED up from the component component list. Check the LED on the breadboard, and then follow the way I like the mouse to line up. It is better to drag a resistor up, or the voltage is too high, led small lantern will explode. The wiring is such that one of the LED's feet is connected to the 13th port on the Arduino. In a moment you look down and it's defined in the code. The other foot is connected to the 5v power port and a resistor is placed in the middle.

OK, then, you can click on the "Start Simulation" button in the upper right corner or "Upload & Run" in the Code Editor to start the simulation, you should be able to see the LED light start flashing.

Note Before you begin, check that the code in the Code Editor is not the following code ah, if not a copy paste. Read the following code, also very simple, the initial connection of the port number 13th, which is why we have to connect the number 13th. Then in the loop to give a high level, over 1000 milliseconds to give a low level, cyclical.

Please note that the Arduino code is the default blink code as below, if it isn't, you need to copy and paste it into Code Editor before you upload and run:

//Pin has a LED connected on the 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 (the voltage level)  Delay (+);               //wait for a second  Digitalwrite (LED, low);    //Turn the LED off by making the voltage  Low Delay (+);               //wait for a second}

It's quite simple.

Down I want to use the LM35 temperature sensor to check the current temperature, down in writing:)

About Autodesk 123D Circuits, the use of YouTube, there are a lot of videos, unfortunately to FQ, we should learn the science of the Internet, you see it.

Videos on YouTube

Take the first step in the Internet of things and play the Arduino

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.