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