- Install PlatformIO or equivalent
- Follow the scematic/reference breadboard
- I'm thinking one D1-mini per goal for now..
| // | |
| // Spinner.swift | |
| // IHS-aafh | |
| // | |
| // Created by Gustaf Nilklint on 2020-05-28. | |
| // Copyright © 2020 Gustaf Nilklint. All rights reserved. | |
| // | |
| import SwiftUI |
| func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) { | |
| for task in backgroundTasks { | |
| switch task { | |
| case let backgroundTask as WKApplicationRefreshBackgroundTask: | |
| BackgroundService.shared.updateContent() | |
| backgroundTask.setTaskCompletedWithSnapshot(false) | |
| case let urlSessionTask as WKURLSessionRefreshBackgroundTask: | |
| BackgroundService.shared.handleDownload(urlSessionTask) |
| // | |
| // BackgroundService.swift | |
| // | |
| // Created by Gustaf on 2020-01-27. | |
| // Copyright © 2020 Gustaf. All rights reserved. | |
| // | |
| import Foundation | |
| import WatchKit |
| // Author - Santosh Rajan | |
| import Foundation | |
| let jsonObject: [AnyObject] = [ | |
| ["name": "John", "age": 21], | |
| ["name": "Bob", "age": 35], | |
| ] | |
| func JSONStringify(value: AnyObject, prettyPrinted: Bool = false) -> String { |
| // Returns a string with the given format, any nil-values will be eliminated and extra white-space is trimmed away for you =) | |
| + (instancetype)safeStringWithFormat:(NSString *)format, ... | |
| { | |
| va_list ap; | |
| va_start(ap, format); | |
| NSString *intermediateString = [[NSString alloc] initWithFormat:format arguments:ap]; | |
| va_end(ap); | |
| NSString *resultString = [intermediateString stringByReplacingOccurrencesOfString:@"(null)" withString:@""]; | |
| resultString = [resultString stringByReplacingOccurrencesOfString:@"<null>" withString:@""]; |
| // | |
| // NSDictionary+prettyPrint.m | |
| // GarageRemote | |
| // | |
| // Created by Gustaf Nilklint on 2014-09-15. | |
| // Copyright (c) 2014 Gustaf Nilklint. All rights reserved. | |
| // | |
| #import "NSDictionary+prettyPrint.h" |