Do you have any faces keyboard programs?
-
Hello!
I need a faces keyboard program!
Do you have it?Thanks! -
Could you be more specific? what faces keyboard program? If your talking about the factory stock firmware you can find it here https://github.com/m5stack/FACES-Firmware
-
@lukasmaximus thanks
-
@lukasmaximus uhh..."'DDRB' was not declared in this scope!"
-
Did you get this message during the flashing process? What method did you use to flash the firmware? The M5Stack must be completely erased before flashing this firmware
-
i got this message too. on compilation phase. Arduino IDE. It was updated to 1.8.10. I choose M5Stack-Core-ESP32 board.
-
āNot declared in this scopeā usually means that it canāt find a library installed on your computer. Make sure that you have all the libraries listed in the top list.
-
If you can share your code, it would be much easier for us to help resolve the problem. What exactly are you trying to do with the keyboard face?
-
@lukasmaximus
I took GameBoy.ino file from https://github.com/m5stack/FACES-Firmware, Install ArduinoIDE from official site and setup esp32 support. Sketch file is original, not modified.
And now, I get error, as start compile there. here is full text:C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino: In function 'void setup()': GameBoy:16:3: error: 'DDRC' was not declared in this scope DDRC = 0x01; ^ GameBoy:17:3: error: 'PORTC' was not declared in this scope PORTC = 0x01; ^ GameBoy:18:3: error: 'DDRD' was not declared in this scope DDRD = 0x00; ^ GameBoy:19:3: error: 'PORTD' was not declared in this scope PORTD = 0x00; ^ GameBoy:20:3: error: 'DDRB' was not declared in this scope DDRB = 0x00; ^ GameBoy:21:3: error: 'PORTB' was not declared in this scope PORTB = 0xff; ^ GameBoy:22:11: error: 'PINB' was not declared in this scope oldPINB=PINB; ^ C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino: In function 'void requestEvent()': GameBoy:30:14: error: 'PINB' was not declared in this scope Wire.write(PINB); ^ GameBoy:10:23: error: 'PORTC' was not declared in this scope #define IRQ_1 Set_Bit(PORTC,0) ^ C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino:5:32: note: in definition of macro 'Set_Bit' #define Set_Bit(val, bitn) (val |=(1<<(bitn))) ^ C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino:34:5: note: in expansion of macro 'IRQ_1' IRQ_1; ^ C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino: In function 'void loop()': GameBoy:40:6: error: 'PINB' was not declared in this scope if(PINB!=oldPINB) ^ GameBoy:11:23: error: 'PORTC' was not declared in this scope #define IRQ_0 Clr_Bit(PORTC,0) ^ C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino:6:33: note: in definition of macro 'Clr_Bit' #define Clr_Bit(val, bitn) (val&=~(1<<(bitn))) ^ C:\Users\userrrr\Downloads\FACES-Firmware-master\FACES-Firmware-master\GameBoy\GameBoy.ino:44:5: note: in expansion of macro 'IRQ_0' IRQ_0; ^ exit status 1 'DDRC' was not declared in this scopeand here ino file
#include <Wire.h> #define FACES_KEYBOARD_I2C_ADDR 0x08 #define Set_Bit(val, bitn) (val |=(1<<(bitn))) #define Clr_Bit(val, bitn) (val&=~(1<<(bitn))) #define Get_Bit(val, bitn) (val &(1<<(bitn)) ) //KEY PORTB //IRQ PC0 #define IRQ_1 Set_Bit(PORTC,0) #define IRQ_0 Clr_Bit(PORTC,0) unsigned char oldPINB=0; void setup() { DDRC = 0x01; PORTC = 0x01; DDRD = 0x00; PORTD = 0x00; DDRB = 0x00; PORTB = 0xff; oldPINB=PINB; Wire.begin(FACES_KEYBOARD_I2C_ADDR); Wire.onRequest(requestEvent); } unsigned char i = 0; unsigned char temp = 0, hadPressed = 0; void requestEvent() { Wire.write(PINB); if (hadPressed == 1) { hadPressed = 0; IRQ_1; } } void loop() { if(PINB!=oldPINB) { temp=PINB; oldPINB=temp; IRQ_0; hadPressed = 1; } /* if (PINB != 0xff) { switch(PINB) { case 0xFE:temp='U';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0xFD:temp='D';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0xFB:temp='L';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0xF7:temp='R';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0xEF:temp='A';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0xDF:temp='B';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0xBF:temp='s';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; case 0x7F:temp='S';while(PINB!=0xff)delay(1);IRQ_0;hadPressed = 1;break; } }*/ delay(10); } -
Problem solved. Apparently this skethes only for faces-modules, not for Core-module.
You should be more specific in progrmamm description. Whatever, thanks for answer.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better š
Register Login