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
// http://arms22.blog91.fc2.com/blog-entry-232.html | |
#include <Wire.h> | |
#include <RTC8564.h> | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
Rtc.begin(); | |
} |
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
package com.example.kashima.myapplication; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.widget.EditText; | |
import android.widget.TextView; | |
import butterknife.ButterKnife; |
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
// 参考: http://garretlab.web.fc2.com/arduino/introduction/beginning_with_7segment_led/ | |
int num[10][8] = { | |
{0, 0, 1, 0, 1, 0, 0, 0}, // 0 | |
{1, 1, 1, 0, 1, 0, 1, 1}, // 1 | |
{0, 0, 1, 1, 0, 0, 1, 0}, // 2 | |
{1, 0, 1, 0, 0, 0, 1, 0}, // 3 | |
{1, 1, 1, 0, 0, 0, 0, 1}, // 4 | |
{1, 0, 1, 0, 0, 1, 0, 0}, // 5 | |
{0, 0, 1, 0, 0, 1, 0, 0}, // 6 |
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
// アソードコモンのため0の場所が光る | |
int num[10][8] = { | |
{0, 0, 1, 0, 1, 0, 0, 0}, // 0 | |
{1, 1, 1, 0, 1, 0, 1, 1}, // 1 | |
{0, 0, 1, 1, 0, 0, 1, 0}, // 2 | |
{1, 0, 1, 0, 0, 0, 1, 0}, // 3 | |
{1, 1, 1, 0, 0, 0, 0, 1}, // 4 | |
{1, 0, 1, 0, 1, 1, 0, 0}, // 5 | |
{0, 0, 1, 0, 1, 1, 0, 0}, // 6 | |
{1, 1, 1, 0, 1, 0, 0, 0}, // 7 |
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
// Now time | |
#define START_HOUR 1 | |
#define START_MINUTES 21 | |
// Alarm | |
#define ALARM_HOUR 1 | |
#define ALARM_MINUTES 22 | |
bool isRing = false; | |
int nowHour = START_HOUR; |
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
void setup() { | |
Serial.begin(9600); | |
pinMode(11, OUTPUT); | |
digitalWrite(11, HIGH); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
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
void setup() { | |
pinMode(11, OUTPUT); | |
pinMode(12, OUTPUT); | |
pinMode(13, INPUT); | |
digitalWrite(12, HIGH); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: |
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
void setup() { | |
// put your setup code here, to run once: | |
pinMode(12, OUTPUT); | |
pinMode(13, INPUT); | |
pinMode(11, OUTPUT); | |
digitalWrite(12, HIGH); | |
} | |
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
bool isHigh = true; | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
pinMode(12, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: |
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 UIKit | |
import ReactiveCocoa | |
class ViewController: UIViewController { | |
@IBOutlet var textInput: UITextField! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |