Recources met en voor de Arduino
Schoolbelautomaat
- http://adafru.it/715 - I2C Controlled + Keypad Shield Kit for 16x2 LCD
- http://adafru.it/3296 - DS1307 Real Time Clock Breakout board
Arduino IDE change font
https://tminusarduino.blogspot.nl/2016/03/how-to-theme-and-change-font-of-arduino.html
- Plaats TTF fonts in
C:\Program Files (x86)\Arduino\java\lib\fonts
- Bewerk
C:\Users\youruser\AppData\Local\Arduino15\Preferences.txt
en wijzig de regel "editor.font". Verander Monospaced in welk font je mooi vind (hoofdletter-gevoelig!). Mijn favoriet:
editor.font=Consolas,plain,14
Arduino IDE preferences
Als je toch bezig bent, wijzig de standaard venstergrootte in een groter formaat:
editor.window.height.default=1000 editor.window.width.default=1400
Arduino IDE dark theme
The original dark theme made by Jeff Thompson is nice but has an unclear color for bracket highlighting. More themes can be found here: https://github.com/per1234/ino-themes . A very good dark theme is themeDark-smilem.zip
installatie
- Back up your current theme by rename the folder {Arduino IDE installation folder}/lib/theme to theme.original or any other convenient name.
- Download the desired theme from the download link on the list above.
- Copy the theme folder from the downloaded file to {Arduino IDE installation folder}/lib. (Meestal
C:\Program Files (x86)\Arduino\lib
) - Restart the Arduino IDE if it's running.
Hoe krijg ik de geheugenindeling van mijn Arduino sketches?
Antwoord: zoek in de builddirectories de .elf-file en pas toe:
avr-objdump -t project.elf
of:
avr-size.exe -t project.elf
De builddirectories vind je in C:\Users\{user}\AppData\Local\Temp\arduino_build_*
De tools avr-size.exe
vind je meestal in C:\Program Files (x86)\Arduino\hardware\tools\avr\bin
Enige uitleg: zie ook http://www.avr-developers.com/mm/memoryusage.html Het programma laat zien:
CPU USAGE +----------------+ __data_start =256 + data + + variables + data_size =540 + + +----------------+ __data_end =796 +----------------+ __bss_start =796 + bss + + variables + bss_size =315 + + +----------------+ __bss_end =1111 +----------------+ __heap_start =1111 + + + heap + heap_size =2427 + + +----------------+ heap_end =3538 +----------------+ Current STACK =4317 + + + stack + stack_size =35 + + +----------------+ RAMEND =4351 available =779 Free memory3233
Vage shit
Lees meer over het verschil tussen argument doorgeven 'pass by pointer' en 'pass by reference' met &. https://arduino.stackexchange.com/questions/24033/proper-use-of-and-when-passing-objects-in-methods
Lees meer over const char* en zo https://arduino.stackexchange.com/questions/13429/deprecated-conversion-from-string-constant-to-char
krijg je errors als deze:
error: unable to find a register to spill in class 'NO_REGS'
lees dan: https://github.com/arduino/Arduino/issues/3972 Men wijst op een bug in AVR-GCC. Daar kan ik niet veel mee. Echter op https://www.cooking-hacks.com/forum/viewtopic.php?f=20&t=9392 wijst iemand erop dat sprintf soms problemen geeft. En inderdaad verwijderen van sprintf() laat de boel weer correct compileren.