Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef ARDUINO
- #include "stdafx.h"
- #include <conio.h>
- #endif
- #include "Chatpad.h"
- Chatpad pad;
- #include <LiquidCrystal.h>
- LiquidCrystal lcd(7, 6, 2, 3, 4, 5);
- void loop()
- {
- pad.poll();
- }
- void print_keys(Chatpad &pad, Chatpad::keycode_t code,
- Chatpad::eventtype_t type) {
- if (type == Chatpad::Down) {
- char a = pad.toAscii(code);
- if (a != 0)
- {
- lcd.print(a);
- }
- }
- }
- void setup()
- {
- // set up the LCD's number of columns and rows:
- lcd.begin(20, 4);
- pad.init(Serial, print_keys);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement