Ja, som det kan ses af nedenstående, så skriver jeg nogle gange på Engelsk.
Teksten til højre for // er en kort beskrivelse af hvad hver linje gør.
/* * Analog In converted to DEC, HEX, OCT and BIN */ int analogValue = 0; // Variable for analog value void setup() // Run once, when the sketch starts { Serial.begin(9600); // Setting communication up at 9600 bps on TX pin at Arduino Uno Serial.write(0xFE); // Special Command Extended Serial.write(0x01); // Clear Display delay(10); // Delay for clearing the Display Serial.write(0x7C); // Special Command Serial.write(150); // Backlight brightness level (128 = Off, 140 = 40%, 150 = 73%, 157 = Fully On) delay(10); // Delay for changing Backlight brightness } void loop() // Run over and over again { analogValue = analogRead(1); // Reading of the analog input pin 1 Serial.print("Ain1 DEC"); // Pretext for DEC Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x10); // Move to Row 1 Column 17 Serial.print(analogValue, DEC); // Print in ASCII-encoded decimal Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x40); // Move to Row 2 Column 1 Serial.print("Ain1 HEX"); // Pretext for HEX Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x4F); // Move to Row 2 Column 16 Serial.print("0x"); // Pretext II for Hex Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x51); // Move to Row 2 Column 18 Serial.print(analogValue, HEX); // Print in ASCII-encoded hexadecimal Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x14); // Move to Row 3 Column 1 Serial.print("Ain1 OCT"); // Pretext for OCT Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x24); // Move to Row 3 Column 17 Serial.print(analogValue, OCT); // Print in ASCII-encoded octal Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x54); // Move to Row 4 Column 1 Serial.print("Ain1 BIN "); // Pretext for BIN Serial.write(0xFE); // Special Command Extended Serial.write(0x80+0x5E); // Move to Row 4 Column 11 Serial.print(analogValue, BIN); // Print in ASCII-encoded binary delay(1000); // Time for Display read out Serial.write(0xFE); // Special Command Extended Serial.write(0x01); // Clear Display }