Embed presentation
Downloaded 303 times



























































![Code & Explanation/* Program for Using Keypad with Arduino */#include <Keypad.h>#include <Wire.h>const byte Rows= 4;//number of rows on the keypad i.e. 4const byte Cols= 4;char keymap[Rows][Cols]={{'1', '2', '3','A'},{'4', '5', '6','B'},{'7', '8', '9','C'},{'*', '0', '#','D'}};//a char array is definedbyte rPins[Rows]= {9,8,7,6};//Rows 0 to 3byte cPins[Cols]= {5,4,3,2};//Columns 0 to 3// command for library for keypadKeypad kpd=Keypad(makeKeymap(keymap), rPins, cPins,Rows, Cols);void setup(){Serial.begin(9600); // serial monitor}//If key is pressed, this key is stored in'keypressed' variable’//If key is not equal to 'NO_KEY', then thiskey is printed outvoid loop() //main program{char keypressed = kpd.getKey();if (keypressed != NO_KEY){Serial.print(keypressed); // write this string onthe top row}}](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2farduinoworkshopday1-basicarduino-191210044704%2f75%2fArduino-Workshop-Day-1-Basic-Arduino-60-2048.jpg&f=jpg&w=240)









The document covers an Arduino workshop, explaining Arduino as an open-source electronics prototyping platform meant for artists and designers. It details Arduino's significance, capabilities, and various components, as well as basic electrical concepts related to Arduino use. Additionally, it provides insights into programming with Arduino, including sketches, loops, and the use of components such as sensors and actuators.



























































![Code & Explanation/* Program for Using Keypad with Arduino */#include <Keypad.h>#include <Wire.h>const byte Rows= 4;//number of rows on the keypad i.e. 4const byte Cols= 4;char keymap[Rows][Cols]={{'1', '2', '3','A'},{'4', '5', '6','B'},{'7', '8', '9','C'},{'*', '0', '#','D'}};//a char array is definedbyte rPins[Rows]= {9,8,7,6};//Rows 0 to 3byte cPins[Cols]= {5,4,3,2};//Columns 0 to 3// command for library for keypadKeypad kpd=Keypad(makeKeymap(keymap), rPins, cPins,Rows, Cols);void setup(){Serial.begin(9600); // serial monitor}//If key is pressed, this key is stored in'keypressed' variable’//If key is not equal to 'NO_KEY', then thiskey is printed outvoid loop() //main program{char keypressed = kpd.getKey();if (keypressed != NO_KEY){Serial.print(keypressed); // write this string onthe top row}}](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2farduinoworkshopday1-basicarduino-191210044704%2f75%2fArduino-Workshop-Day-1-Basic-Arduino-60-2048.jpg&f=jpg&w=240)








