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 "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(); |
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 "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!!"); |
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 "NewPing.h" | |
#define TRIGpin 2 | |
#define ECHOpin 3 | |
#define MaxDistance 200 | |
NewPing m(TRIGpin, ECHOpin, MaxDistance); | |
void setup() { | |
Serial.begin(9600); |
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 "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); |
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 "Servo.h" | |
int value = 0; | |
Servo m; | |
void setup() { | |
m.attach(9); | |
Serial.begin(9600); | |
} |
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
%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) |
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 <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, |
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 "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}; |
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 "Servo.h" | |
#define SOUT 12 | |
#define PLAYE 11 | |
int value = 0; | |
Servo m; | |
void setup() { |
OlderNewer