1. De hardware ............................................................................................................................................... 4
1.1 Arduino UNO board met microcontroller ATmega 328 ................................................................................ 4
1.1.1 Embedded systemen ............................................................................................................................ 4
1.1.2 Wat is Arduino? .................................................................................................................................... 4
1.2 Het Multifunctional Shield ............................................................................................................................ 5
1.3 ATmega328................................................................................................................................................... 6
1.3.1 De ATmega328 architectuur ................................................................................................................. 6
1.3.2 ATmega328 op de Arduino ................................................................................................................... 7
1.3.3 ATmega328 via VMA209 expansion shield op de Arduino ................................................................... 9
2. De programmeertaal C .............................................................................................................................. 10
2.1 Wat is C? ..................................................................................................................................................... 10
2.1.1 Belangrijkste kenmerken .................................................................................................................... 10
2.1.2 C libraries ............................................................................................................................................ 10
2.1.3 Van source naar executable ................................................................................................................ 10
2.2 De syntax van C........................................................................................................................................... 11
2.2.1 Identifiers ............................................................................................................................................ 11
2.2.2 Constanten en String literals ............................................................................................................... 12
2.2.3 Operatoren ......................................................................................................................................... 12
2.2.4 Punctuatoren (scheiden van tokens) .................................................................................................. 12
2.2.5 Commentaar ....................................................................................................................................... 12
2.2.6 Variabelen in C .................................................................................................................................... 13
2.2.7 Basisstructuren in C ............................................................................................................................ 13
2.2.8 Verschillen C en Java ........................................................................................................................... 14
2.3 Aanvulling ................................................................................................................................................... 14
2.3.1 Eenvoudige I/O in C ............................................................................................................................ 14
2.3.2 Arrays in C ........................................................................................................................................... 15
2.3.3 Strings in C .......................................................................................................................................... 15
2.4 Bit operaties in C ......................................................................................................................................... 16
2.4.1 Werking............................................................................................................................................... 17
2.4.2 Oefening ............................................................................................................................................. 18
3.1 Schrijven naar een pin................................................................................................................................. 18
3.1.1 Welke pin? .......................................................................................................................................... 19
3.1.2 Een paar voorbeelden ......................................................................................................................... 19
3.2 DE wet van Ohm en de LED......................................................................................................................... 20
3.2.1 Wet van Ohm ...................................................................................................................................... 20
3.2.2 Elektrisch schema ............................................................................................................................... 21
3.2.3 LEDs..................................................................................................................................................... 21
3.2.4 LEDs op Multi-Functional Shield ......................................................................................................... 22
, 3.4 Nieuw project in VS-Code............................................................................................................................ 22
3.5 Een eigen library gebruiken in VS code ....................................................................................................... 23
3.5.1 USART library ...................................................................................................................................... 23
1. Interfacing met de hardware ..................................................................................................................... 25
1.1 Lezen van een pin........................................................................................................................................ 25
1.1.1 Aan welke pin hangt een knop? .......................................................................................................... 25
1.1.2 En hoe test je nu of ze ingedrukt is? ................................................................................................... 26
1.1.3 Debounce ............................................................................................................................................ 26
1.2 Interrupts .................................................................................................................................................... 26
1.2.1 Hoe werkt het interrupt systeem? ...................................................................................................... 26
1.2.2 Aan de slag: hoe configureer ik een interrupt? .................................................................................. 27
1.2.3 Conclusie ............................................................................................................................................. 28
2. Programmeertaal C ................................................................................................................................... 28
2.3 Overige tutorials ......................................................................................................................................... 34
2.3.1 Wat is een pull-up weerstand? ........................................................................................................... 34
2.3.2 Wat is een seriële poort? .................................................................................................................... 36
1.2 Aan de slag ................................................................................................................................................. 39
2. Het LED display met zijn shiftregister ........................................................................................................ 39
3.2 Dynamische allocatie geheugen ................................................................................................................. 43
3.2.1 Array van strings ................................................................................................................................. 43
3.2.2 Zelf geheugen alloceren ...................................................................................................................... 43
3.2.3 Array van strings met eigen geheugenallocatie .................................................................................. 43
3.3 Stack en Heap ............................................................................................................................................. 44
3.3.1 Stack overflow en Heap overflow ....................................................................................................... 45
2
, 4. Wat is een potentiometer? ....................................................................................................................... 45
1.1 Wat is muziek?............................................................................................................................................ 47
1.3 Aan de slag ................................................................................................................................................. 48
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 compie. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $5.89. You're not tied to anything after your purchase.