Skip to content

Instantly share code, notes, and snippets.

View houmei's full-sized avatar

Katunori Takesita houmei

View GitHub Profile
@houmei
houmei / a2print.cpp
Created September 10, 2012 05:07
A2 Thermal Printer bitmap test
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "delay.cpp"
#include "openserial.cpp"
int openFlags ;
const char *path = "/dev/tty.usbserial-AE01APTO" ;
// const char *path = "/dev/tty.usbserial" ;
@houmei
houmei / LM35DZ.ino
Created September 14, 2012 19:26
Thermal Sensor LM35DZ/Arduino UNO R3
#include <LiquidCrystal.h>
// http://arduino.cc/en/Reference/AnalogReference
unsigned int t,c;
float sc;
int sensor0 = A0 ;
int value = 0 ;
// initialize the library with the numbers of the interface pins
@houmei
houmei / LM35DZ.ino
Created September 14, 2012 22:54
Thermal Sensor LM35DZ/Arduino UNO R3 2012/09/15 fixed
#include <LiquidCrystal.h>
// http://arduino.cc/en/Reference/AnalogReference
unsigned int t,c;
float sc;
int sensor0 = A0 ;
int value = 0 ;
// initialize the library with the numbers of the interface pins
@houmei
houmei / usbrawkybd.cpp
Created October 3, 2012 15:04
USB HID keyboard memo (arduinoIDE1.0.1)
/*
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
@houmei
houmei / HID-Report-Desciripter.txt
Created October 8, 2012 18:31
USB JP-Keyboard / Arduino Leonardo HID Report Descriptor
japanese USB Keyboard:
Interface 0 HID Report Descriptor Keyboard
Usage Page (Generig Desktop) 0501
Usage (Keyboard) 0906
Collection (Application) A101
Usage Page (Keyboard/Keypad) 0507
Usage Minimum (Keyboard Left Control) 19E0
Usage Maximum (Keyboard Right GUI) 29E7
Logical Minimum (0) 1500
@houmei
houmei / chkihex.awk
Created October 9, 2012 17:29
check intel-hex format file
#! /usr/local/bin/gawk -f
# chkihex.awk
#
# check intel-hex file
# 2012/10/09 K.Takesita
#
# Intel HEX format
# http://en.wikipedia.org/wiki/Intel_HEX
#
@houmei
houmei / PS2kybd.cpp
Created October 15, 2012 12:56
PS/2Keyboard for Arduino Leonardo 20121015
/*
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
@houmei
houmei / pincon.ino
Created November 3, 2012 02:23
Pinball Controller by Arduino Leonardo
// Pinball controller
// Arduino Leonardo
// 20121102 K.takesita
//
int Tilt=A1;
int Rpaddle=A3;
int Lpaddle=A4;
int Shoot=A5;
@houmei
houmei / lm35dz_6.ino
Created November 30, 2012 14:32
Arduino LM35DZ x6 logger
// LM35DZ x6 Thermal Logger
// 2012.11.30 K.Takesita
//
// http://arduino.cc/en/Reference/AnalogReference
unsigned int t,c;
float sc;
// unsigned long time;
#define NUM_LM35 6
int LM35[NUM_LM35] = {A0,A1,A2,A3,A4,A5}; // Analog port
@houmei
houmei / serialtest.ino
Created December 10, 2012 12:19
Androld Serial Monitor Lite -- UNO R3 OK、Leonardo/Micro NG
// Androld Serial Monitor Lite
// tested 2012.12.10
// MacOSX 10.7
// Arduino IDE 1.0.2
//
// Arduino UNO R3 -- OK
// Arduino Leonardo -- 問題が発生したため、Android USB Serial Monitorを終了しました
// →ConnectしてもAndroid→Arduino方向しかデータがいかない (RX点滅,TX消灯のまま)
// Arduino Micro -- Leonardoと同じ現象
//