Lesson 01 - introduction & Embedded Primer

The lecture

Tentative agenda.

  1. Short intro to embedded system applied on Arduino

  2. Refurbish of Arduino and C skills

    1. Get Arduino IDE up and running

    2. Get your Arduino up and running

  1. Intro to Arduino and coding environment

  2. Getting you all up and running on our Arduinos

    1. If you dont have an Arduino either coop with person aside you or …

    2. go to tinkercad , create a user, login and use the simulator

    3. but realstuff on your table is the best way to go

  3. Code structure in imperative coding

  4. My first programs

    1. blink

    2. text

    3. integer variables

  5. ALL OF YOU CODING IN BETWEEN at classroom

Preparation for the lecture

    1. I will recommend installing SW instead of using netbased solution simply because of potential wlan problems.

    2. If you have an old version please upgrade or install to version 1.8.9

  1. Test your installation by just compile and upload an empty programm

  2. See the movies (See below)

  3. Configure your editor so you will have line numbers displayed

  4. Find out where your code files are stored on your harddisk

    1. Hint look in preferences

It might not be strictly in the sequential order given above

We know some of you have coded before but we need ALL of you to be fluent in coding, so
if you you are fluent in coding HELP the persons around you.
You might end up in same project group and there you rely on all can code.

Exercises

    1. get it up an running

  1. Code (copycat) program in movie no 2

    1. get it up and running

  2. Code blinking SOS on led13

    1. S: … O:  —  ( SOS: …  —  … …  —  … etc)

    2. A dot last 200 msec (or whatever you like

    3. A dash last 3 times a dot

    4. time between dot and dashes is equal to dot length

    5. time between letters is equal to one dash length

    6. time between words is 7 equal to seven dots length

    7. See also wikipedia interesting stuff is in botttom

  3. Add printing so you print SOS at same time

  4. Help people around you

Litterature

Primary

  1. A comics about coding on Arduino

    1. Very light and easy intro

  2. Introduction to Arduino (Alan G. Smith)

    1. chapter 1 - same as Evans just in another way - read it !

  3. TutorialsPoint about Arduino

    1. ch 1-4

You might also read:

  1. Beginning C for Arduino Jack Purdum

    1. Ch 1 -2 - pp 1-19, 20-35

    2. Ch 1 easy reading, Ch 2 need to be read carefully - lots of examples inside

  2. Arduino Programming Notebook (Evans)

    1. pp 7-9 - introduction to code structure

HW:

You need

  1. Arduino SW installed

    1. An Arduino UNO/MEGA/… with a LED on pin13

  2. Maybe … extra LEDs, a breadboard and a 500-1000 ohm resistors

  3. a pushbutton

  4. wires for the breadboard

Movies

  1. Handling LED no 13

  2. Handling printing text (and still handling LED 13)

After today - you should (at least) be able to …

  1. Install Arduino IDE (Integrated Development Environment)

  2. Write a small program

  3. Compile and upload the program

    1. NB: remember to select type of Arduino and USB port

  4. Handling digital output (LED13)

  5. Handling Serial Communication

  6. UNDERSTAND setup and loop sequential execution

Tips

  1. See here

Morse an A (.-) again and again

In loop you may write

// dot
 digitalWrite(13,HIGH);
 delay(1000);
 digitalWrite(13,LOW);
 delay(1000);
// dash
 digitalWrite(13,HIGH);
 delay(3*1000);
 digitalWrite(13,LOW);
 delay(1000+2000);

For the interested :-)

=   : dot
=== : dash 3 times length of dot

.   : symbol space
         - 1 between symbols in letter
         - 3 between letters
         - 7 between word

−− −−− ·−· ··· ·       −·−· −−− −·· ·
M   O   R   S  E        C    O   D  E

         1         2         3         4         5         6         7         8
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789

M------   O----------   R------   S----   E       C----------   O----------   D------   E

===.===...===.===.===...=.===.=...=.=.=...=.......===.=.===.=...===.===.===...===.=.=...=
   ^   ^^^        ^^^   ^       ^          ^^^^^^^
   |    |          |    |                     |
   |  letter space |    dot                word space
   |              dash
symbol space

For fun: How can I use these coins for decoding