Skip to content

Instantly share code, notes, and snippets.

Richard Ho skynettw

Block or report user

Report or block skynettw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View arduino-pet-feed-machine.c
#include "Servo.h"
#define SOUT 12
#define PLAYE 11
int value = 0;
Servo m;
void setup() {
View base-3arm-robot.c
#include "Servo.h"
#define M1 9
#define M2 10
#define M3 11
#define TOTAL_MOTORS 2
Servo motor[TOTAL_MOTORS];
Servo base;
int mmax[TOTAL_MOTORS] = {180, 180};
int mmin[TOTAL_MOTORS] = {0, 0};
int current_degree[TOTAL_MOTORS] = {90, 90};
View ledcontrol_nkfust
#include <LedControl.h>
const int DIN_PIN = 12;
const int CS_PIN = 10;
const int CLK_PIN = 11;
const uint64_t IMAGES[] PROGMEM = {
0x0000000000000000,
0x0000001818000000, 0x0018245a5a241800, 0x18245aa5a55a2418,
0x245aa54242a55a24, 0x5aa542818142a55a, 0xa5428100008142a5,
0x4281000000008142, 0x8100000000000081, 0x0000000000000000,
0x0000001818000000, 0x0018245a5a241800, 0x18245aa5a55a2418,
View stock_info.py
%matplotlib inline
import pandas as pd
import matplotlib.pyplot as plt
url="http://www.twse.com.tw/indicesReport/MI_5MINS_HIST?response=csv&date=20170101"
stocks = pd.read_csv(url, encoding='big5', skiprows=1, thousands=',')
stocks = stocks.drop(stocks.columns[5], axis=1)
stocks.columns = ['Date', 'Open', 'High', 'Low', 'Close']
stocks = stocks.set_index('Date')
for i in range(2,13):
url="http://www.twse.com.tw/indicesReport/MI_5MINS_HIST?response=csv&date=2017{:02}01".format(i)
View arduino-test-for-sound-detect.c
#include "Servo.h"
int value = 0;
Servo m;
void setup() {
m.attach(9);
Serial.begin(9600);
}
View arduino-unit-12-2
#include "NewPing.h"
#include "Wire.h"
#include "LiquidCrystal_I2C.h"
#define TRIGpin 2
#define ECHOpin 3
#define MaxDistance 200
NewPing m(TRIGpin, ECHOpin, MaxDistance);
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);
View arduino-unit-12-1
#include "NewPing.h"
#define TRIGpin 2
#define ECHOpin 3
#define MaxDistance 200
NewPing m(TRIGpin, ECHOpin, MaxDistance);
void setup() {
Serial.begin(9600);
View arduino-unit-11-2
#include "Wire.h"
#include "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);
void setup() {
Serial.begin(9600);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Hi, NKFUST!!");
View arduino-unit-11-1
#include "Wire.h"
#include "LiquidCrystal_I2C.h"
LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3,POSITIVE);
void setup() {
lcd.begin(16,2);
lcd.backlight();
delay(2000);
lcd.noBacklight();
View arduino-unit-9-2
int RELAYpin = 7;
int PHOTOpin = A1;
void setup() {
pinMode(RELAYpin, OUTPUT);
digitalWrite(RELAYpin, LOW);
}
void loop() {
int pr = analogRead(PHOTOpin);
You can’t perform that action at this time.