Hi,
Hopefully someone can help.
I have a Pro Micro board that is connected to toggle switches, a switch input will output a keystroke.
I am running the latest IDE on Mac, also with latest OS.
My sketch is working as expected without any problems, however, now I want to change the outputs to different keystrokes
If I modify the sketch Keyboard.write("x"); to another character, and then reload the sketch, the sketch does not change the characters. it remains as it was.
There is no sign of an error or anything untoward.
I can change sketches to something completely different but if I try to simply modify the sketch nothing happens.
Any suggestions??
parkwaysnows:
Any suggestions??
Yes,........ first read the forum requirements.
Then post both you code (in code brackets) and a circuit diagram...NOT fritzing
parkwaysnows:
Any suggestions??
adjusting the Arduino-IDE in this way to get ALL detail-info of your compiling process
Hi newcomer,
the Arduino-Forum community can be of great help.
If the community is able to support you in a way that helps solving your problems depends on
detailed information that you should provide.
trying to be quick by posting a too short posting is just
slowing down
finding the solution. Because all that happends is that you are asked for the detailed information and have to provide it anyway. Only difference the answer and the solution comes later
The most important thing is to post …
then posting the complete compiler- and upload log as a code-section
Adding these lines of code to your setup()-function
void setup() {
Serial.begin(115200); // or what your baudrate is
Serial.println("Setup-Start");
Serial.println( F("Code running comes from file ") );
Serial.println( F(__FILE__) );
Serial.print( F(" compiled ") );
Serial.print( F(__DATE__) );
Serial.print( F(" ") );
Serial.println( F(__TIME__) );
This prints the filename the date and time of that code-version that is really inside the flash-memory to the serial monitor
best regards Stefan
Make certain that when you follow the procedures presented by @StefanL38 you check the box for "Verify Code After Upload".
#include <Keyboard.h>
int switch2 = 2;
int switch3 = 3;
int switch4 = 4;
int switch5 = 5;
int switch6 = 6;
int switch7 = 7;
int switch8 = 8;
int switch9 = 9;
int switch10 = 10;
int switch14 = 14;
int switch15 = 15;
int switch16 = 16;
int del1 = 70;
int switch2Old = 0;
int switch2New;
int switch2State = 1;
int switch3Old = 0;
int switch3New;
int switch3State = 1;
int switch4Old = 0;
int switch4New;
int switch4State = 1;
int switch5Old = 0;
int switch5New;
int switch5State = 1;
int switch6Old = 0;
int switch6New;
int switch6State = 1;
int switch7Old = 0;
int switch7New;
int switch7State = 1;
int switch8Old = 0;
int switch8New;
int switch8State = 1;
int switch9Old = 0;
int switch9New;
int switch9State = 1;
int switch10Old = 0;
int switch10New;
int switch10State = 1;
int switch14Old = 0;
int switch14New;
int switch14State = 1;
int switch15Old = 0;
int switch15New;
int switch15State = 1;
int switch16Old = 0;
int switch16New;
int switch16State = 1;
int switch17Old = 0;
int switch17New;
int switch17State = 1;
int switch18Old = 0;
int switch18New;
int switch18State = 1;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(switch2, INPUT_PULLUP);
pinMode(switch3, INPUT_PULLUP);
pinMode(switch4, INPUT_PULLUP);
pinMode(switch5, INPUT_PULLUP);
pinMode(switch6, INPUT_PULLUP);
pinMode(switch7, INPUT_PULLUP);
pinMode(switch8, INPUT_PULLUP);
pinMode(switch9, INPUT_PULLUP);
pinMode(switch10, INPUT_PULLUP);
pinMode(switch14, INPUT_PULLUP);
pinMode(switch15, INPUT_PULLUP);
pinMode(switch16, INPUT_PULLUP);
Keyboard.begin();
}
void loop() {
switch2New = digitalRead(switch2);
if (switch2Old != switch2New) {
if (switch2State == 1) {
Keyboard.write("Q");
switch2State = 0;
} else {
Keyboard.write("Q");
switch2State = 1;
}
}
switch2Old = switch2New;
switch3New = digitalRead(switch3);
if (switch3Old != switch3New) {
if (switch3State == 1) {
Keyboard.write("W");
switch3State = 0;
} else {
Keyboard.write("W");
switch3State = 1;
}
}
switch3Old = switch3New;
switch4New = digitalRead(switch4);
if (switch4Old != switch4New) {
if (switch4State == 1) {
Keyboard.write("E");
switch4State = 0;
} else {
Keyboard.write("E");
switch4State = 1;
}
}
switch4Old = switch4New;
switch5New = digitalRead(switch5);
if (switch5Old != switch5New) {
if (switch5State == 1) {
Keyboard.write("R");
switch5State = 0;
} else {
Keyboard.write("R");
switch5State = 1;
}
}
switch5Old = switch5New;
switch6New = digitalRead(switch6);
if (switch6Old != switch6New) {
if (switch6State == 1) {
Keyboard.write("T");
switch6State = 0;
} else {
Keyboard.write("T");
switch6State = 1;
}
}
switch6Old = switch6New;
switch7New = digitalRead(switch7);
if (switch7Old != switch7New) {
if (switch7State == 1) {
Keyboard.write("Y");
switch7State = 0;
} else {
Keyboard.write("Y");
switch7State = 1;
}
}
switch7Old = switch7New;
switch8New = digitalRead(switch8);
if (switch8Old != switch8New) {
if (switch8State == 1) {
Keyboard.write("U");
switch8State = 0;
} else {
Keyboard.write("U");
switch8State = 1;
}
}
switch8Old = switch8New;
switch9New = digitalRead(switch9);
if (switch9Old != switch9New) {
if (switch9State == 1) {
Keyboard.write("I");
switch9State = 0;
} else {
Keyboard.write("I");
switch9State = 1;
}
}
switch9Old = switch9New;
switch10New = digitalRead(switch10);
if (switch10Old != switch10New) {
if (switch10State == 1) {
Keyboard.write("O");
switch10State = 0;
} else {
Keyboard.write("O");
switch10State = 1;
}
}
switch10Old = switch10New;
switch14New = digitalRead(switch14);
if (switch14Old != switch14New) {
if (switch14State == 1) {
Keyboard.write("P");
switch14State = 0;
} else {
Keyboard.write("P");
switch14State = 1;
}
}
switch14Old = switch14New;
switch15New = digitalRead(switch15);
if (switch15Old != switch15New) {
if (switch15State == 1) {
Keyboard.write("L");
switch15State = 0;
} else {
Keyboard.write("L");
switch15State = 1;
}
}
switch15Old = switch15New;
switch16New = digitalRead(switch16);
if (switch16Old != switch16New) {
if (switch16State == 1) {
Keyboard.write("K");
switch16State = 0;
} else {
Keyboard.write("K");
switch16State = 1;
}
}
switch16Old = switch16New;
delay(del1);
}
I am sorry I haven't followed the forum protocol.
Please see the Code, apologies for not having this setup as an Array, I still can't figure out how to make them work as an array.
This code works for one side of my application so I don't have a great need to make it more concise.
The only reason I am here now is that I have another pro micro that I want to use for a similar application (helicopter sim parts) that need to use different output characters.
That last piece of code you sent was added and it made an initial difference, the output changed as expected, but same issue again once it uploaded, I tried to modify the output again and it stayed the same?
I repeat myself:
If you want decent help you will have to provide decent and DETAILED information
[quote="StefanL38, post:3, topic:1222109"]
adjusting the Arduino-IDE in this way to get ALL detail-info of your compiling process
Hi newcomer,
the Arduino-Forum community can be of great help.
If the community is able to support you in a way that helps solving your problems depends on
detailed information that you should provide.
trying to be quick by posting a too short posting is just
slowing down
finding the solution. Because all that happends is that you are asked for the detailed information and have to provide it anyway. Only difference the answer and the solution comes later
The most important thing is to post …
I'm sorry Stefan I'm trying to get the info but I do not get an error message to copy??
IDE is not throwing an error message, the code (it appears) is uploading as normal.??...
You can click into the lower part of the Arduino-IDE where all the message runs through while the compiler works
Then press mark all copy and then paste as a code-section
Yep got it, I had serial monitor running. ok info coming....
FQBN: SparkFun:avr:promicro:cpu=16MHzatmega32U4
Using board 'promicro' from platform in folder: /Users/colinmacpro/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.13
Using core 'arduino' from platform in folder: /Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PROMICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x1b4f -DUSB_PID=0x9206 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SparkFun Pro Micro" -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/colinmacpro/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.13/variants/promicro /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp -o /dev/null
Alternatives for Keyboard.h: [Keyboard@1.0.4]
ResolveLibrary(Keyboard.h)
-> candidates: [Keyboard@1.0.4]
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PROMICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x1b4f -DUSB_PID=0x9206 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SparkFun Pro Micro" -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/colinmacpro/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.13/variants/promicro -I/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp -o /dev/null
Alternatives for HID.h: [HID@1.0]
ResolveLibrary(HID.h)
-> candidates: [HID@1.0]
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PROMICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x1b4f -DUSB_PID=0x9206 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SparkFun Pro Micro" -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/colinmacpro/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.13/variants/promicro -I/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/libraries/HID/src /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp -o /dev/null
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_da_DK.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_de_DE.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_en_US.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_es_ES.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_fr_FR.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_it_IT.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/KeyboardLayout_sv_SE.cpp
Using cached library dependencies for file: /Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/libraries/HID/src/HID.cpp
Generating function prototypes...
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PROMICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x1b4f -DUSB_PID=0x9206 -DUSB_MANUFACTURER="Unknown" -DUSB_PRODUCT="SparkFun Pro Micro" -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/colinmacpro/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.13/variants/promicro -I/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/libraries/HID/src /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp -o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/1237018706/sketch_merged.cpp
/Users/colinmacpro/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/1237018706/sketch_merged.cpp
Compiling sketch...
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PROMICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x1b4f -DUSB_PID=0x9206 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"SparkFun Pro Micro\"" -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/colinmacpro/Library/Arduino15/packages/SparkFun/hardware/avr/1.1.13/variants/promicro -I/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src -I/Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/libraries/HID/src /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp -o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp.o
/Volumes/SSD 2/B206_MIP/B206_MIP.ino: In function 'void loop()':
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:110:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("1");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:113:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("1");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:123:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("A");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:126:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("A");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:136:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("S");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:139:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("S");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:149:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("D");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:152:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("D");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:162:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("F");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:165:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("F");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:175:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("G");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:178:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("G");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:188:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("H");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:191:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("H");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:201:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("I");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:204:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("I");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:214:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("O");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:217:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("O");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:227:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("P");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:230:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("P");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:240:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("H");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:243:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("H");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:253:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("J");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
/Volumes/SSD 2/B206_MIP/B206_MIP.ino:256:25: warning: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Keyboard.write("J");
^
In file included from /Volumes/SSD 2/B206_MIP/B206_MIP.ino:1:0:
/Users/colinmacpro/Library/Arduino15/libraries/Keyboard/src/Keyboard.h:140:10: note: initializing argument 1 of 'virtual size_t Keyboard_::write(uint8_t)'
size_t write(uint8_t k);
^~~~~
Compiling libraries...
Compiling library "Keyboard"
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_en_US.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_es_ES.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/Keyboard.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_fr_FR.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_de_DE.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_da_DK.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_it_IT.cpp.o
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_sv_SE.cpp.o
Compiling library "HID"
Using previously compiled file: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/HID/HID.cpp.o
Compiling core...
Using precompiled core: /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/cores/SparkFun_avr_promicro_cpu_16MHzatmega32U4_1af73216580ffe733b8ce4d290998fbd/core.a
Linking everything together...
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega32u4 -o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.elf /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/sketch/B206_MIP.ino.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/Keyboard.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_da_DK.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_de_DE.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_en_US.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_es_ES.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_fr_FR.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_it_IT.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/Keyboard/KeyboardLayout_sv_SE.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/libraries/HID/HID.cpp.o /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/../../cores/SparkFun_avr_promicro_cpu_16MHzatmega32U4_1af73216580ffe733b8ce4d290998fbd/core.a -L/private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712 -lm
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.elf /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.eep
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.elf /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.hex
Using library Keyboard at version 1.0.4 in folder: /Users/colinmacpro/Library/Arduino15/libraries/Keyboard
Using library HID at version 1.0 in folder: /Users/colinmacpro/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/libraries/HID
/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.elf
Sketch uses 7278 bytes (25%) of program storage space. Maximum is 28672 bytes.
Global variables use 334 bytes (13%) of dynamic memory, leaving 2226 bytes for local variables. Maximum is 2560 bytes.
Performing 1200-bps touch reset on serial port /dev/cu.usbmodemHIDPC1
Waiting for upload port...
Upload port found on /dev/cu.usbmodem101
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
"/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/colinmacpro/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -patmega32u4 -cavr109 -P/dev/cu.usbmodem101 -b57600 -D "-Uflash:w:/private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.hex:I"
User configuration file is "/Users/colinmacpro/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem101
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.
Programmer supports the following devices:
Device code: 0x44
avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: reading input file "/private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.hex"
avrdude: writing flash (7278 bytes):
Writing | ################################################## | 100% 0.54s
avrdude: 7278 bytes of flash written
avrdude: verifying flash memory against /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.hex:
avrdude: load data flash data from input file /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.hex:
avrdude: input file /private/var/folders/gb/c6kd8js92ys1jnxflv_smtl80000gn/T/arduino/sketches/A34FDFDF02AA72EA024F6D7357B28712/B206_MIP.ino.hex contains 7278 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.05s
avrdude: verifying ...
avrdude: 7278 bytes of flash verified
avrdude done. Thank you.
type or paste code here
I wanted to give you some context to what I'm making, the switch box holds one pro micro, the display panel will take another. hence the two different output keystroke requirements.
I really appreciate all your help!! Coding is very new to me, as is everything else I'm learning here to make this project work!
Colin
cool project seems to be a real detailed flight simulator
How should anybody analyse what is going on with such poor words as "same issue"???!
Your sketch has the filename "B206_MIP.ino "
Save the sketch with "safe as .... " with a different filename.
Compile and upload again.
If the serial monitor shows the new filename you really know uploading works.
If you see the new and different filename but the codes behaviour is still not what you expect the problem is inside your code.
parkwaysnows:
That last piece of code you sent was added and it made an initial difference, the output changed as expected, but same issue again once it uploaded, I tried to modify the output again and it stayed the same?
You will have to deliver even more detailed information
Your actual sketch
a detailed description what does it mean in detail
but same issue again: what exact issue??
once it uploaded: post the exact uploaded and complete sketch
I tried to modify the output again: did you upload your code new AFTER modifying it?
if yes post this complete modified sketch
and it stayed the same: WHAT exactly stayed the same?
the code ?
the serial printing of date and time ?
the printed character?
You will have to describe it in this detailed way:
I uploaded this code-version (post as a code-section (posting the complete sketch)
and got this output in the serial monitor (posting serial output as a code-section too
and when I press button "name of button" the HID-output is: writing the letter that is outputted
Then I modify the code (post modified complete sketch)
add a comment to that line of code that you modified "something like "modified from ... to ....
I uploaded this modified code-version
and got this output in the serial monitor (posting output as a code-section
and when I press button "name of button" the HID-output is: writing the letter that is outputted
name everything EXPLICITLY. generalising words like "same" "issue" etc. don't help. They waste time through asking back
best regards Stefan
Stefan, thank you.
Apologies, I had thought I was being clear and concise but you are quite correct, it is very ambiguous on reflection.
I have just modified my sketch from Keyboard.write("x");
with double quotation marks to single quotation marks (code attached below)
I added your code
Serial.begin(115200); // or what your baudrate is
Serial.println("Setup-Start");
Serial.println( F("Code running comes from file ") );
Serial.println( F(__FILE__) );
Serial.print( F(" compiled ") );
Serial.print( F(__DATE__) );
Serial.print( F(" ") );
Serial.println( F(__TIME__) );
This version of code has now appeared to have fixed my issue!!??!!
I really appreciate your patience!!
Thank you!!
Colin
#include <Keyboard.h>
int switch2 = 2;
int switch3 = 3;
int switch4 = 4;
int switch5 = 5;
int switch6 = 6;
int switch7 = 7;
int switch8 = 8;
int switch9 = 9;
int switch10 = 10;
int switch14 = 14;
int switch15 = 15;
int switch16 = 16;
int del1 = 70;
int switch2Old = 0;
int switch2New;
int switch2State = 1;
int switch3Old = 0;
int switch3New;
int switch3State = 1;
int switch4Old = 0;
int switch4New;
int switch4State = 1;
int switch5Old = 0;
int switch5New;
int switch5State = 1;
int switch6Old = 0;
int switch6New;
int switch6State = 1;
int switch7Old = 0;
int switch7New;
int switch7State = 1;
int switch8Old = 0;
int switch8New;
int switch8State = 1;
int switch9Old = 0;
int switch9New;
int switch9State = 1;
int switch10Old = 0;
int switch10New;
int switch10State = 1;
int switch14Old = 0;
int switch14New;
int switch14State = 1;
int switch15Old = 0;
int switch15New;
int switch15State = 1;
int switch16Old = 0;
int switch16New;
int switch16State = 1;
int switch17Old = 0;
int switch17New;
int switch17State = 1;
int switch18Old = 0;
int switch18New;
int switch18State = 1;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200); // or what your baudrate is
Serial.println("Setup-Start");
Serial.println( F("Code running comes from file ") );
Serial.println( F(__FILE__) );
Serial.print( F(" compiled ") );
Serial.print( F(__DATE__) );
Serial.print( F(" ") );
Serial.println( F(__TIME__) );
pinMode(switch2, INPUT_PULLUP);
pinMode(switch3, INPUT_PULLUP);
pinMode(switch4, INPUT_PULLUP);
pinMode(switch5, INPUT_PULLUP);
pinMode(switch6, INPUT_PULLUP);
pinMode(switch7, INPUT_PULLUP);
pinMode(switch8, INPUT_PULLUP);
pinMode(switch9, INPUT_PULLUP);
pinMode(switch10, INPUT_PULLUP);
pinMode(switch14, INPUT_PULLUP);
pinMode(switch15, INPUT_PULLUP);
pinMode(switch16, INPUT_PULLUP);
Keyboard.begin();
}
void loop() {
switch2New = digitalRead(switch2);
if (switch2Old != switch2New) {
if (switch2State == 1) {
Keyboard.write('1');
switch2State = 0;
} else {
Keyboard.write('1');
switch2State = 1;
}
}
switch2Old = switch2New;
switch3New = digitalRead(switch3);
if (switch3Old != switch3New) {
if (switch3State == 1) {
Keyboard.write('2');
switch3State = 0;
} else {
Keyboard.write('2');
switch3State = 1;
}
}
switch3Old = switch3New;
switch4New = digitalRead(switch4);
if (switch4Old != switch4New) {
if (switch4State == 1) {
Keyboard.write('l');
switch4State = 0;
} else {
Keyboard.write('l');
switch4State = 1;
}
}
switch4Old = switch4New;
switch5New = digitalRead(switch5);
if (switch5Old != switch5New) {
if (switch5State == 1) {
Keyboard.write('4');
switch5State = 0;
} else {
Keyboard.write('4');
switch5State = 1;
}
}
switch5Old = switch5New;
switch6New = digitalRead(switch6);
if (switch6Old != switch6New) {
if (switch6State == 1) {
Keyboard.write('5');
switch6State = 0;
} else {
Keyboard.write('5');
switch6State = 1;
}
}
switch6Old = switch6New;
switch7New = digitalRead(switch7);
if (switch7Old != switch7New) {
if (switch7State == 1) {
Keyboard.write('6');
switch7State = 0;
} else {
Keyboard.write('6');
switch7State = 1;
}
}
switch7Old = switch7New;
switch8New = digitalRead(switch8);
if (switch8Old != switch8New) {
if (switch8State == 1) {
Keyboard.write('7');
switch8State = 0;
} else {
Keyboard.write('7');
switch8State = 1;
}
}
switch8Old = switch8New;
switch9New = digitalRead(switch9);
if (switch9Old != switch9New) {
if (switch9State == 1) {
Keyboard.write('8');
switch9State = 0;
} else {
Keyboard.write('8');
switch9State = 1;
}
}
switch9Old = switch9New;
switch10New = digitalRead(switch10);
if (switch10Old != switch10New) {
if (switch10State == 1) {
Keyboard.write('9');
switch10State = 0;
} else {
Keyboard.write('9');
switch10State = 1;
}
}
switch10Old = switch10New;
switch14New = digitalRead(switch14);
if (switch14Old != switch14New) {
if (switch14State == 1) {
Keyboard.write('Q');
switch14State = 0;
} else {
Keyboard.write('Q');
switch14State = 1;
}
}
switch14Old = switch14New;
switch15New = digitalRead(switch15);
if (switch15Old != switch15New) {
if (switch15State == 1) {
Keyboard.write('E');
switch15State = 0;
} else {
Keyboard.write('E');
switch15State = 1;
}
}
switch15Old = switch15New;
switch16New = digitalRead(switch16);
if (switch16Old != switch16New) {
if (switch16State == 1) {
Keyboard.write('R');
switch16State = 0;
} else {
Keyboard.write('R');
switch16State = 1;
}
}
switch16Old = switch16New;
delay(del1);
}
You did not answer as requested.
If it works everything is fine.
To determine if changing from double-quotation-mark to single quotation-mark
or adding printing the code-version made it work
to be as short as you: just test
I am truly sorry, I just didn't want to waste any more of your time, as you said it works, so I don't want to continue to bother you with it.
Thank you!
The only thing that wastes time is posting too short so others have to ask back.
If you post 50 lines of text well formatted paragraphes with titles everybody can crossread over the titles to find that part of information that is interesting. And then no time is wasted by asking back.
Just do it this way with your next question.