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
| @property (strong, nonatomic) UIWindow *window; | |
| @property (nonatomic) UITableView *taskTable; | |
| @property (nonatomic) UITextField *taskField; | |
| @property (nonatomic) UIButton *insertButton; | |
| @property (nonatomic) NSMutableArray *tasks; | |
| -(void)addTask:( id )sender; | |
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
| //create and configure the UI windows view instances | |
| CGRect winFrame = [[UIScreen mainScreen] bounds]; | |
| UIWindow *theWindow = [[UIWindow alloc] initWithFrame:winFrame]; | |
| self.window = theWindow; | |
| CGRect tableframe = CGRectMake(0, 80, winFrame.size.width, winFrame.size.height - 100); |
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
| // | |
| // NSObject+BNRAsset.h | |
| // objective-c relearn | |
| // | |
| // Created by izzuddin on 25/08/2017. | |
| // Copyright © 2017 izzuddin. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
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) |
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
| //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
| //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 |