Arduino guide
In recent years, I've started to make Arduino circuits (simpler
than built) and over time have moved from BASCOM-AVR to the C
programming language used by Arduino.
(After Pascal, Delphi and
Basic, it was a little bit difficult, but you speak as many languages
as possible ...)
Unfortunately, many things are hard to come by because Internet resources are full of basic solutions and examples. Here are some simple but more useful Arduino tricks to share:
Here are some basic things to get started:
Variables with Value Assignment:
Type name = assignment size:
char c = „A”; //or it can be a value (0..255): char c = 123; 1 Byte (8bit)
byte b = 10; // (0..255) 1 Byte (8bit)
int i = 10; // (-32768..32767) 2 Byte (16bit)
unsigned int ui = 10; // (0..65535) 2 Byte (16bit)
word w = 10; // (0..65535) 2 Byte (16bit)
unsigned long ul = 10; // (0..4.294.967.295) 4 Byte (32bit)
long l = 10; // (-2.147.483.648..2.147.483.647) 4 Byte (32bit)
float l = 10; // (-3,4028235E+38..3,4028235E+38 ) 4 Byte (32bit)
double d = 10; // (..) 8 Byte (64bit)
long long l = 10; // (−9.223.372.036.854.775.807..+9.223.372.036.854.775.807) 8 Byte (64bit)
unsigned long long l = 10; // (0..18.446.744.073.709.551.615) 8 Byte (64bit)
int Lcd3 = 0x23; // Hexadecimal value assignment
Tricks:
Software reboot without Watchdog timer and other hardware naughtiness (tested with Mega2560):
asm volatile ( "jmp 0");
Managing multiple 4x20 character displays on an i2c bus (HD44780)
Managing a Cheap Infrared Remote Control (38kHz upd6122)
LGDP4535 TFT display handling (320x240 18bit) + original library bug fix