Keypad


#1

Hi,

I am trying to use a KEYPAD for a project. I took an Arduino and the following extension
pad

But a mistake, do you have any idea?

start processing code…

processing code by middleware of pinMode

Arduino server connected.

Arduino compile…

#include <Arduino.h> #include <Wire.h> #include <SoftwareSerial.h> void _delay(float seconds) ; void _loop() ; // generated by mBlock5 for // codes make you happy char key ; void _delay(float seconds) { long endTime = millis() + seconds * 1000; while(millis() < endTime) _loop(); } void setup() { key= customkeypad.getKey(); } void _loop() { } void loop() { _loop(); }

variantPath:/app/src/external/arduino/avr-library/variants/standard

avr-toolchain/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/external/arduino/avr-library/variants/standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src/" -I"arduino-libraries/makeblock/src/utility/avr/" -I"avr-library/libraries/Wire/src/utility/" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" “/root/mblock-avr/temp/build/code.cpp” -o “/root/mblock-avr/temp/build/code.o”

Command failed: avr-toolchain/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"/app/src/external/arduino/avr-library/variants/standard" -I"avr-library/cores/arduino" -I"arduino-libraries/makeblock/src/" -I"arduino-libraries/makeblock/src/utility/avr/" -I"avr-library/libraries/Wire/src/utility/" -I"avr-library/libraries/Wire/src/" -I"avr-library/libraries/EEPROM/src/" -I"avr-library/libraries/SPI/src/" -I"avr-library/libraries/SoftwareSerial/src/" -I"arduino-libraries/arduino/WiFi/src/" -I"arduino-libraries/arduino/SD/src/" -I"arduino-libraries/arduino/Bridge/src/" -I"arduino-libraries/arduino/Temboo/src/" -I"arduino-libraries/arduino/Servo/src/" -I"arduino-libraries/arduino/Ethernet/src/" -I"arduino-libraries/arduino/TFT/src/" -I"arduino-libraries/arduino/SpacebrewYun/src/" -I"arduino-libraries/arduino/LiquidCrystal/src/" -I"arduino-libraries/arduino/GSM/src/" “/root/mblock-avr/temp/build/code.cpp” -o “/root/mblock-avr/temp/build/code.o” /root/mblock-avr/temp/build/code.cpp: In function ‘void setup()’: /root/mblock-avr/temp/build/code.cpp:23:8: error: ‘customkeypad’ was not declared in this scope key= customkeypad.getKey(); ^~~~~~~~~~~~

Failed to compile file code.cpp

Arduino compile finish.

Arduino server disconnected.

Without this extension, all is functional … this extension seems well done to me.


#2

Hi Makeblock,

Is it normal that there is no space after the Include?


#3

Hi,Crackel

If the code can run successfully that is ok


#4

In fact, it does not work …

Web version = Not working
Local PC version = Not working

It’s sad…


#5

Hi Crackel

Did you create the extension yourself? and which extension doesn’t work,only this keypad?


#6

Hi makeblock.lindingxin,

Makeblock or internet extensions work but none for the PAD. I would have liked to use a Makeblock card like Orion or mCore but there is no extension because there are a lot of PINs to connect … If I could adapt the KeyPad to the RJ25 that would be ideal.

Conclusion: Arduino and probably I’ll do an extension. I would have liked to have had the code for the extension to find the problem but otherwise I will start a code from zero.


#7

Hi Crackel

Can you upload the library files maybe we can check the error for you


#8

Yes makeblock.lindingxin,

I have already started other extensions but it takes me a long time. I would have liked to use an extension already created. Thank you


#9

hey!! did you manage to work it out ? (the keypad extension)


#10

Hi say,

I went with an ESP32 Espressif with the KeyPad… I needed a lot of PIN…

Project in lost time but moving forward…


#11

Either they made a bad extension or you aren’t using it correctly. :grinning:
It says the custom library “customkeypad” was not declared in the code.
Look at the source Arduino C code that your blocks translate to (Click the </> arrow). Around the top of the code, is there any code that says:

#include “customkeypad.h”

or something similar?
If so, there is just a bad include in the extension, or it is referenced incorrectly.
Else, copy that code and paste it in the “Arduino C” ab (upper right-hand corner). Add in the include code (#include “customkeypad.h”) and change things around a little. See if the code will upload this time.

Else, you can try a different extension or make one yourself.
(I can also sigh make you an extension, but it might take a while.)

Thanks for your time,
Best_codes