Skip to content

Instantly share code, notes, and snippets.

View houmei's full-sized avatar

Katunori Takesita houmei

View GitHub Profile
@houmei
houmei / pinHIGHLOW.ino
Created February 2, 2014 15:28
Intel Galileo GPIO test
unsigned long t;
int Loop=10000;
int pin=1;
void setup() {
Serial.begin(9600);
// initialize the digital pin as an output.
pinMode(pin, OUTPUT);
delay(1000);
}
@houmei
houmei / galileo-boot-sd.txt
Created February 7, 2014 02:44
Intel Galileo boot message
Press [Enter] to directly boot.
Press [F7] to show boot menu options.
@houmei
houmei / StellarPad.ino
Created March 13, 2014 15:14
Energia example : LaunchPad Stellaris
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(RED_LED, OUTPUT);
pinMode(GREEN_LED, OUTPUT);
pinMode(BLUE_LED, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
@houmei
houmei / TFT.cpp
Created May 14, 2014 15:07
Adafruit 1.8" TFT Shield HardwareSPI/SoftwareSPI
#include "TFT.h"
#if (USB_VID == 0x2341) && (USB_PID == 0x803C) // are we building for Esplora?
TFT EsploraTFT(7, 0, 1);
#endif
TFT::TFT(uint8_t CS, uint8_t RS, uint8_t RST)
: Adafruit_ST7735(CS, RS, RST)
{
// as we already know the orientation (landscape, therefore rotated),
@houmei
houmei / TFT_randomline2.ino
Created May 15, 2014 17:29
Arduino IDE 1.0.5 + Arduino UNO + Adafruit 1.8" TFT Shield -> hang up after 1s / Solved! run well without uSD card
/*
TFT demo
https://github.com/arduino/TFT
http://arduino.cc/en/Reference/TFTLibrary
*/
// randomdot
#include <TFT.h>
#include <SPI.h>
@houmei
houmei / TFT_debug.ino
Created May 15, 2014 17:43
Arduino IDE 1.0.5 + UNO + Adafruit 1.8" TFT Shield / drawFastVline x 8 x 10000, then hang
/*
TFT demo
https://github.com/arduino/TFT
http://arduino.cc/en/Reference/TFTLibrary
*/
// randomdot
#include <TFT.h>
#include <SPI.h>
@houmei
houmei / TFT_hardwareSPI.ino
Created May 21, 2014 15:23
Adafruit 1.8" TFT Shield + Jig(Hardware SPI)
/*
TFT demo
https://github.com/arduino/TFT
http://arduino.cc/en/Reference/TFTLibrary
*/
// randomdot
#include <TFT.h>
#include <SPI.h>
@houmei
houmei / brink.ino
Created May 26, 2014 13:54
86Duino digitalpin test
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
@houmei
houmei / SainSmartTFT.ino
Created May 27, 2014 20:01
SainSmart TFT + 86Duino
#include <TFT.h>
#include <SPI.h>
#define TFT_CS 42
#define TFT_DC 43
#define TFT_RST 0
#define TFT_SCLK 0
#define TFT_MOSI 0
TFT screen = TFT(TFT_CS, TFT_DC, TFT_RST); // for UNO
@houmei
houmei / GPS_GM318B.ino
Created June 19, 2014 15:50
GPS module GM318B sample / with Crowduino(3.3V)+Grove Shield
// http://www.aitendo.com/product/1007
// GPS module GM318B test
// Crowduino-3.3V + GroveShield
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{