made copy from a working sketch
did save as
i open that version now get error
also it copy all the files auto matic in the directory
< CODE/ >
//#include "PluggableUSBHID.h"
//#include "USBKeyboard.h"
//USBKeyboard Keyboarda;
//Keyboarda.printf("a");
//#include "Arduino_GigaDisplay_GFX.h"
//GigaDisplay_GFX display; // create the object
// Create RGB object
//-----------------------------------
//#define BLACK 0x0000
//#define WHITE 0xffff
//#define RED 0xf805
//#define GREEN 0x07e4
//---------------------------- test code --------------------
#include "USBHostGiga.h"
//REDIRECT_STDOUT_TO(Serial)
Keyboard keyb;
HostSerial ser;
uint8_t rotation = 180;
void setup() {
// put your setup code here, to run once:
//Wire.begin();
//-------------- pin --------------------------
pinMode(13, OUTPUT);// a
pinMode(12, OUTPUT);// d
pinMode(11, OUTPUT);// s
pinMode(10, OUTPUT);// w
pinMode(9, OUTPUT);// f
pinMode(LED_BUILTIN, OUTPUT); // testing
//--------------------------------------------
// display.begin();
//display.fillScreen(BLACK);
//display.setCursor(10,10); //x,y
//display.setTextSize(2); //adjust text size
//display.setTextColor(WHITE,BLACK);
//display.print("Hello World!"); //print
//---------------------------------------
//display.drawCircle(100, 100, 50, WHITE);
// Keyboard.begin();
//while (!Serial); <<< kan je nog terug zetten als niet meer werkt zonder deze doet ook zonder pc
pinMode(PA_15, OUTPUT);
keyb.begin();
ser.begin();
}
void loop() {
//delay(1);
String userInput = "";
while (true) {
if (keyb.available() > 0) {
auto _key = keyb.read();
char inputChar = keyb.getAscii(_key);
//display.print(inputChar);
//display.setCursor(10,10); //x,y
//isplay.drawPixel(40, 40, WHITE);
//-------------------------------------
//display.setCursor(10,60); //x,y
//display.setTextSize(4); //adjust text size
//isplay.setTextColor(GREEN);
//display.print("probeer"); //print
//display.setTextColor(BLACK,BLACK);
//display.setCursor(400,10); //x,y
//display.print("#");
//display.setTextColor(GREEN);
//display.setCursor(400,10); //x,y
//display.fillRect(390, 10, 80, 40, BLACK);
//display.print(inputChar); //print test
//display.drawRect(390, 10, 80, 20, GREEN); // drawRect(x, y, width,height, color)
if (inputChar == '1') {
Serial.println("test regel 1");
}
//----------------------------------------------------
if (inputChar == '2') {
Serial.println("test regel 2");
}
//----------------------------------------------------
if (inputChar == ' ') {
//Serial.println("test regel leeg");
//digitalWrite(LED_BUILTIN, LOW);
//display.setTextColor(GREEN);
//display.setCursor(400,10); //x,y
//display.setTextSize(4); //adjust text size
//display.print("-"); //print
//display.fillRect(390, 10, 80, 40, BLACK);
}
//----------------------------------------------------
if (inputChar == 'h') {
Serial.println("h");
digitalWrite(12, HIGH);
delay(10);
digitalWrite(12, LOW);
delay(10);
}
//----------------------------------------------------
//----------------------------------------------------
if (inputChar == 'g') {
Serial.println("g");
digitalWrite(3, HIGH);
delay(1000);
digitalWrite(3, LOW);
}
//---------------------------------------------------- keyboard zondag ------------------------------------------------------
if (inputChar == 'a') {
Serial.println("pin13 out pin 3v3 A");
digitalWrite(13, LOW);
}
else {
digitalWrite(13, HIGH);
}
//-----------------------------------------------
//---------------------------------------------------- keyboard zondag ------------------------------------------------------
if (inputChar == 'd') {
Serial.println("pin12 out pin 3v3 D");
digitalWrite(12, LOW);
}
else {
digitalWrite(12, HIGH);
}
//-----------------------------------------------
//---------------------------------------------------- keyboard zondag ------------------------------------------------------
if (inputChar == 's') {
Serial.println("pin11 out pin 3v3 S");
digitalWrite(11, LOW);
}
else {
digitalWrite(11, HIGH);
}
//-----------------------------------------------
//---------------------------------------------------- keyboard zondag ------------------------------------------------------
if (inputChar == 'w') {
Serial.println("pin10 out pin 3v3 W");
digitalWrite(10, LOW);
}
else {
digitalWrite(10, HIGH);
}
//-----------------------------------------------
//---------------------------------------------------- keyboard zondag ------------------------------------------------------
if (inputChar == 'f') {
Serial.println("pin9 out pin 3v3 F");
digitalWrite(9, LOW);
}
else {
digitalWrite(9, HIGH);
}
//-----------------------------------------------
//-----------------------------------------------
if (inputChar == '1') {
Serial.println("test regel 3 test keuken 1");
digitalWrite(6, HIGH);
}
else {
digitalWrite(6, LOW);
}
//---------------------------------------------------
}
}
//------------------------------------------------------- zaterdag -------------------------------------------------------
digitalWrite(LED_BUILTIN, HIGH);
//---------------------------------BLUE
}
//------------------------------------------
void subroutinename() {
// program
}
< CODE/ >