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
| // | |
| // ViewController.swift | |
| // TestHEIC | |
| // | |
| // Created by Costantino Pistagna on 14/11/2018. | |
| // Copyright © 2018 sofapps. All rights reserved. | |
| // | |
| import UIKit | |
| import AVFoundation |
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 chk = DHT.read22(DHT22_PIN); | |
| switch (chk) | |
| { | |
| case DHTLIB_OK: | |
| client.print("{ \"temperature\":"); | |
| client.print(DHT.temperature-2); | |
| client.print(", \"humidity\":"); | |
| client.print(DHT.humidity); | |
| client.println("}"); | |
| break; |
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
| /* | |
| A simple HomeBridgeHub example for HomeBridge | |
| Author: Costantino Pistagna <[email protected]> | |
| */ | |
| #include <dht.h> | |
| #include <Bridge.h> | |
| #include <BridgeServer.h> | |
| #include <BridgeClient.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
| digitalWrite(7, HIGH); | |
| delay(2000); | |
| digitalWrite(7, LOW); |
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
| { | |
| "bridge": { | |
| "name": "Home1bridge", | |
| "username": "CD:32:D2:E1:CC:33", | |
| "port": 50800, | |
| "pin": "031-43-153" | |
| }, | |
| "description": "This is an example configuration file.", |
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
| // | |
| // UIImageView+URLRequest.swift | |
| // | |
| // Created by Costantino Pistagna on 06/11/2017. | |
| // Copyright © 2017 Sofapps. All rights reserved. | |
| // | |
| import UIKit | |
| import Foundation |
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
| // | |
| // String+HTML.swift | |
| // AttributedString | |
| // | |
| // Created by Costantino Pistagna on 08/11/2017. | |
| // Copyright © 2017 sofapps.it All rights reserved. | |
| // | |
| import UIKit | |
| import Foundation |
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
| // | |
| // Array+Utilities.swift | |
| // | |
| // Created by Costantino Pistagna on 26/07/16. | |
| // | |
| import Foundation | |
| extension Array { | |
| mutating func removeObject<T where T : Equatable>(obj: T) { | |
| self = self.filter({$0 as? T != obj}) |
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
| // | |
| // Created by Costantino Pistagna on 08/02/2017. | |
| // Copyright © 2017 sofapps. All rights reserved. | |
| // | |
| func integerWithBytes<T: IntegerType where T: ByteConvertible, T: BitshiftOperationsType> | |
| (bytes: [UInt8]) -> T? | |
| { | |
| if bytes.count != sizeof(T) { | |
| return nil |
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
| // | |
| // CIRotateFilter.h | |
| // Touches | |
| // | |
| // Created by valvoline on 05/01/16. | |
| // Copyright © 2016 valvoline. All rights reserved. | |
| // | |
| #import <CoreImage/CoreImage.h> |