Inhoud
Arduino kennismaking ............................................................................................................................. 2
Wat is een microcontroller.................................................................................................................. 2
Structuur en syntax ............................................................................................................................. 2
Variabelen ........................................................................................................................................... 3
Input/Output ........................................................................................................................................... 4
Interfaces ............................................................................................................................................. 4
Seriële communicatie .............................................................................................................................. 5
Werking ............................................................................................................................................... 5
Communicatie tussen terminal en computer ..................................................................................... 6
Werking op arduino............................................................................................................................. 6
Seriële communicatie (vervolg) ............................................................................................................... 7
RS-485.................................................................................................................................................. 7
I²C: Inter IC connectivity ...................................................................................................................... 8
WS2812 RGB led .................................................................................................................................. 8
Encoders en servo’s ................................................................................................................................. 9
Encoders .............................................................................................................................................. 9
Servo .................................................................................................................................................. 10
RC servomotor ............................................................................................................................... 10
Leonardo Voeding – liquid Crystal Display ............................................................................................ 10
Liquid crystal Display (LCD) ............................................................................................................... 11
Initialisatie ..................................................................................................................................... 11
Bibliotheken .......................................................................................................................................... 12
Stappenmotor ....................................................................................................................................... 12
Eigenschappen................................................................................................................................... 12
Soorten .............................................................................................................................................. 12
Aansluiting ......................................................................................................................................... 13
1
, Arduino kennismaking
Wat is een microcontroller
• Kleine “dedictated” computer zonder besturingsysteem
o Programma ➔ microcontroller ➔Eén proces
• Beperkt in mogelijkheden
o Geheugen, snelheid, …
o K/MHz
o Kb (opslag als geheugen)
o Een functie
o Goedkoop
• Ingebouwde I/O
o Invoer: Sensoren
o Uitvoer: Actuatoren
o Wel fysieke sturing
• Komt overal in voor
• Velen families
o 8051: industrieel
o AVR: arduino omgeving
o PIC: huis, tuin en keuken omgeving
• Programeren
o Low Level
▪ Op niveau van controller
▪ Abstract
▪ Zelf alles definieren
▪ Moeilijk te debuggen
▪ Snelste uitvoering
o High level
▪ Op niveau programmeur
▪ Minder abstract
▪ Voorgedefinieerde structiuren
▪ Gemakkelijk te debuggen
▪ Tragere uitvoering (valt mee)
• Verzamelnaam ontwikkelplatform en dus zelf geen microcontroller
Structuur en syntax
Hoe wordt het opgebouwd
• Geschreven in C taal
• Opgebouwd uit functies
o Setup() en Loop()
Wat is een functie
• Een stuk code dat volledig autonoom werkt
2
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller basmaes. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $8.04. You're not tied to anything after your purchase.