This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
PS2Keyboard.cpp - PS2Keyboard library | |
Copyright (c) 2007 Free Software Foundation. All right reserved. | |
Written by Christian Weichel <info@32leaves.net> | |
** Mostly rewritten Paul Stoffregen <paul@pjrc.com> 2010, 2011 | |
** Modified for use beginning with Arduino 13 by L. Abraham Smith, <n3bah@microcompdesign.com> * | |
** Modified for easy interrup pin assignement on method begin(datapin,irq_pin). Cuningan <cuninganreset@gmail.com> ** | |
for more information you can read the original wiki in arduino.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
PS2Keyboard.cpp - PS2Keyboard library | |
Copyright (c) 2007 Free Software Foundation. All right reserved. | |
Written by Christian Weichel <info@32leaves.net> | |
** Mostly rewritten Paul Stoffregen <paul@pjrc.com> 2010, 2011 | |
** Modified for use beginning with Arduino 13 by L. Abraham Smith, <n3bah@microcompdesign.com> * | |
** Modified for easy interrup pin assignement on method begin(datapin,irq_pin). Cuningan <cuninganreset@gmail.com> ** | |
for more information you can read the original wiki in arduino.cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Button for Keyboard (Arduino Leonardo only) */ | |
/* | |
Button | |
Turns on and off a light emitting diode(LED) connected to digital | |
pin 13, when pressing a pushbutton attached to pin 2. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// include the library code: | |
#include <LiquidCrystal.h> | |
unsigned int t; | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(9, 8, 7, 6, 5, 4); | |
void setup() { | |
// set up the LCD's number of columns and rows: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Button for Keyboard (Arduino Leonardo only) */ | |
/* | |
Button | |
Turns on and off a light emitting diode(LED) connected to digital | |
pin 13, when pressing a pushbutton attached to pin 2. | |
The circuit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Button for Keyboard (Arduino Leonardo only) */ | |
/* | |
Button | |
Turns on and off a light emitting diode(LED) connected to digital | |
pin 13, when pressing a pushbutton attached to pin 2. | |
The circuit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
http://arduino.cc/playground/Main/PS2Keyboard | |
http://arduino.cc/playground/Main/PS2KeyboardExt2 | |
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463446.aspx | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
http://arduino.cc/playground/Main/PS2Keyboard | |
http://arduino.cc/playground/Main/PS2KeyboardExt2 | |
http://msdn.microsoft.com/en-us/library/windows/hardware/gg463446.aspx | |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <PS2kybd.h> | |
// Simple test program for new PS2Keyboard library | |
// Connect a PS2 keyboard to pins 3 & 4 (CLK and DATA respectively) and supply 5V to the keyboard | |
// For examples, see here: http://www.arduino.cc/playground/ComponentLib/Ps2mouse | |
// or here: http://www.beyondlogic.org/keyboard/keybrd.htm | |
// That second article is a great place to start if you want to understand whats going on | |
// | |
// When you've compiled the code and uploaded it to the board, start a serial monitor at | |
// 9600bd. Then press keys on your PS2 keyboard (the one connected to Arduino, not the one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <termios.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
int openPort( const char *path, int speed, int bits, int parity, int stops, int openFlags) | |
24 { |
OlderNewer