This file contains hidden or 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 <Process.h> | |
| #include <Console.h> | |
| #include <Servo.h> | |
| Process date; | |
| int hours, minutes, seconds; | |
| int lastSecond = -1; | |
| Servo myservo; | |
| int pos = 0; | |
| void setup() { |
This file contains hidden or 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
| int val = 0; | |
| void setup() { | |
| Serial.begin(9600); | |
| // put your setup code here, to run once: | |
| } | |
| void loop() { |
This file contains hidden or 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
| /* | |
| Blink | |
| Turns on an LED on for one second, then off for one second, repeatedly. | |
| Most Arduinos have an on-board LED you can control. On the Uno and | |
| Leonardo, it is attached to digital pin 13. If you're unsure what | |
| pin the on-board LED is connected to on your Arduino model, check | |
| the documentation at http://arduino.cc | |
| This example code is in the public domain. |
This file contains hidden or 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
| // ADDED ON 24 JULY 2017 | |
| //connection: | |
| //GND to GND | |
| //VCC TO V in | |
| //SDA to A4 | |
| //SCL to A5 | |
| // Written by John Boxall from http://tronixstuff.com |
This file contains hidden or 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
| //ADDED 24 JULY 2017 | |
| //model ATA8041AB, 6 pins | |
| int segA = 11; // top | |
| int segB = 7; // right-top | |
| int segF = 10; // left-top | |
| int segD = 2; // bottom | |
| int segE = 1; // left-bottom |
This file contains hidden or 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
| //ADDED 24 JULY 2017 | |
| int segA = 11; // top | |
| int segB = 7; // right-top | |
| int segF = 10; // left-top | |
| int segD = 2; // bottom | |
| int segE = 1; // left-bottom | |
| int segC = 4; // right-bottom |
This file contains hidden or 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
| int segA = 3; // top | |
| int segB = 4; // right-top | |
| int segC = 5; // right-bottom | |
| int segD = 6; // bottom | |
| int segE = 7; // left-bottom | |
| int segF = 8; // left-top | |
| int segG = 9; // middle | |
| int dp = 10; | |
| int digit1 = 14; // common cathode for digit1 (i.e. sambung A0) |
This file contains hidden or 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
| int segA = 3; // top | |
| int segB = 4; // right-top | |
| int segC = 5; // right-bottom | |
| int segD = 6; // bottom | |
| int segE = 7; // left-bottom | |
| int segF = 8; // left-top | |
| int segG = 9; // middle | |
| int dp = 10; | |
| int digit1 = 14; // common cathode for digit1 (i.e. A0) |
This file contains hidden or 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
| import currencylayer | |
| import serial | |
| import time | |
| exchange_rate = currencylayer.Client(access_key='eae8fe8c3b393cca980cf0252f876d5f') | |
| a = exchange_rate.live_rates_for(currencies=['MYR'], base_currency='USD') | |
| value = a['quotes']['USDMYR'] * 1000 | |
| ser = serial.Serial('/dev/ttyACM0',9600) | |
| # tunggu 5 saat utk make sure ade mase utk connect ngan arduino, kalau x jadi laju sangat , x sempat nk pick up data |
This file contains hidden or 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
| int segA = 3; // top | |
| int segB = 4; // right-top | |
| int segC = 5; // right-bottom | |
| int segD = 6; // bottom | |
| int segE = 7; // left-bottom | |
| int segF = 8; // left-top | |
| int segG = 9; // middle | |
| int dp = 10; | |
| int digit1 = 14; // common cathode for digit1 (i.e. A0) |
OlderNewer