The Arduino microcontrollers have non volatile EEPROM memory built in. The EEPROM library allows you to read and write those bytes. EEPROM Sizes: 1024 bytes ATmega328 512 bytes ATmega168 ATmega8 4KB (4096 bytes) ATmega1280 ATmega2560. Using The Library Note that you read and write one byte at a time – there is not an array read and […]
All posts by
LiquidCrystal Library
LiquidCrystal Library Using The Library Basic Setup In your main sketch file //—– LCD DISPLAY —– #include <LiquidCrystal.h> LiquidCrystal lcd(12, 10, 11, 9, 8, 7, 6); //7 wire usage: (rs, rw, enable, d4, d5, d6, d7) If you want to use it in other files also #include <LiquidCrystal.h> extern LiquidCrystal lcd; Initialise //—– SETUP LCD […]
Using Libraries In Your Own Files
If you are using libraries such as Wire in your own .c files or library then you need to #include <LibraryName.h> both in your library (where you're using the things it defines) and in your main sketch (which tells the IDE to include its folder in the search path for includes during compilation and to link […]
Add New File
Click the drop down arrow to the right of the file tabs in the IDE. Select 'New Tab' and then name the file. You can add .h, .c and .cpp files just as you would in other C or C++ environments Add Existing File Copy into the projects folder. Close the sketch and then re-open, […]
Using Midi
MIDI Comms MIDI Library Install the library from here. This library documentation seems somewhat overwhelming and difficult to carry out simple tasks such as specifying a different UART TX port when we looked. If you only need to send simple Note On and Note Off commands then you can just use the UART instead if […]
.I2C Using Wire Library
Address values Seems to be 7 bit value with bit0=lower bit (not I2C RW bit), so left shifted by 1 when sent over the wire. Clock Speed https://www.arduino.cc/en/Reference/WireSetClock
Including Files
Don't copy the file you want to include into the projects directory. Ensure the file(s) you want to add to the sketch/project are somewhere else and then use: Menu > Sketch > Add File… The file(s) will be copied into the project directory and added to the project,.
Errors
Upload timeout – avrdude: stk500v2_getsync(): timeout communicating with programmer This error will occur if the TX1 or RX1 pins are being driven by something else, blocking the programming comms. If you are using UART0 for something which is driving the RX pin then disconnect it to allow programming to occur. ‘Wire’ was not declared in this scope If […]
IDE General
Line Numbers The line number of the cursor's position is displayed at the bottom left of the window. Not quite the same as proper line numbers but as good as it gets in the IDE.
chipKIT Genreal
chipKit was created in In May 2011 by Microchip Technology and Digilent by the release of two boards, the chipKIT UNO32 and the chipKIT MAX32. The boards used Microchip PIC32 Microcontrollers and brought 32bit performance to a platform compatible with Arduino. Web Sites chipkit.net Arduino Compatibility chipKIT boards are designed to be form factor compatible with existing Arduino™ boards and the pin-out has been designed […]
