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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import CoreBluetooth | |
import PlaygroundBluetooth | |
import PlaygroundSupport | |
private let serviceUuid = CBUUID(string: "180F") | |
private let characteristicUuid = CBUUID(string: "2A19") |
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
import io | |
f = io.open('main.py', 'w') | |
f.write(''' | |
import hub | |
import time | |
while True: | |
hub.display.show(hub.Image('00000:00000:00900:00000:00000:')) | |
time.sleep_ms(500) |
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
import gc | |
import micropython | |
import hub_runtime | |
micropython.alloc_emergency_exception_buf(256) | |
hub_runtime.start() |
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
// | |
// LineHeightLabel.swift | |
// LineHeightLabel | |
// | |
// Created by Shinichiro Oba on 20/06/2018. | |
// Copyright © 2018 bricklife.com. All rights reserved. | |
// | |
import UIKit |
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
// | |
// BLEPeripheral.swift | |
// BLEPeripheral | |
// | |
// Created by ooba on 26/07/2017. | |
// Copyright © 2017 mercari. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |
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
// | |
// BLEPeripheral.swift | |
// BLEPeripheral | |
// | |
// Created by ooba on 26/07/2017. | |
// Copyright © 2017 bricklife.com. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |
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
import UIKit | |
class InputAccessoryTableViewController: UITableViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
self.tableView.becomeFirstResponder() | |
} | |
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
// | |
// BLEDump.swift | |
// BLEDump | |
// | |
// Created by Shinichiro Oba on 2017/07/25. | |
// Copyright © 2017 Shinichiro Oba. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |