Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
public:crocs:arduino [2014-10-24 22:55] – [Arduino code basics] headlines added lnemec | public:crocs:arduino [2014-10-29 11:37] – lnemec | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Arduino ====== | + | ====== |
+ | |||
+ | * Date: 31. 10. 2014 | ||
+ | * Workshop by: Lukáš Němec | ||
+ | * Cake: we will see... | ||
+ | * Cake by: Mirek Jaroš | ||
+ | * Discussion on A403 wallpainting | ||
+ | |||
+ | ===== What to expect ===== | ||
+ | |||
+ | Introduction to microcontroller programming, | ||
+ | |||
+ | As we learn enough of theoretic background, you will get your hands on Arduino boards and you will have chance to program your own blinking LED or something similar, depending on your time, skill and enthusiasm. | ||
===== What to prepare ===== | ===== What to prepare ===== | ||
Line 23: | Line 35: | ||
===Analog pins=== | ===Analog pins=== | ||
- | Analog pins are used for analog read, when we need more precise value than just binary 0 or 1. Output from these pins can be anything between 0 to 1023 and we use these pins for reading values from sensors, | + | Analog pins are used for analog read, when we need more precise value than just binary 0 or 1. Output from these pins can be anything between 0 to 1023 and we use these pins for reading values from sensors, e.g. humidity, ligth, distance etc. |
=== Power and special pins === | === Power and special pins === | ||
Line 29: | Line 41: | ||
Last category of pins are power pins, these are ground pins, 5V and 3.5V pins. Connect these to power breadboard power lines or components directly, as needed. | Last category of pins are power pins, these are ground pins, 5V and 3.5V pins. Connect these to power breadboard power lines or components directly, as needed. | ||
- | All other pins are used for special purposes, like reset pin or in case of smaller or older versions of arduino for actual programming. | + | All other pins are used for special purposes, like reset pin or in case of smaller or older versions of arduino for actual programming |
<note important> | <note important> | ||
Line 91: | Line 103: | ||
{{ : | {{ : | ||
+ | |||
+ | === Sensors, Analog input and Serial monitor === | ||
+ | |||
+ | Next example will show, how to read values from sensors and how to obtain debugging information from Arduino board. | ||
+ | |||
+ | In order to receive value from sensor, we have to use analog input pins (Arduino UNO has range from A0 to A5) and read values with analogRead function. There are many posibilities what to use as a source of input, you can choose from whatever is avaiable, rotary potentiometer | ||