Skip to content

Instantly share code, notes, and snippets.

Microsft Training - Developing Applications with Containers
============================================================
aka.ms/wscontainers
docker run
Get an Image
===================
from Dockerhub
// mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini
// BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V
#include <GxEPD.h>
// select the display class to use, only one
#include <GxGDEW0154Z04/GxGDEW0154Z04.cpp> // 1.54" b/w/r 200x200
#include GxEPD_BitmapExamples
// FreeFonts from Adafruit_GFX
@glyons
glyons / digitsparkdelayled
Created February 1, 2019 18:21
Digispark 1 second delay button with on board LED
int led =1 ; // Ues on board LED
int button=2; // Button to 5V Rail and 10k register on P2 to GND
int status = false;
void setup() {
digitalWrite(led, LOW);
pinMode(led, OUTPUT);
digitalWrite(button,LOW);
pinMode(button,INPUT);
// Display
#include <ESP_SSD1306.h> // Modification of Adafruit_SSD1306 for ESP8266 compatibility
#include <Adafruit_GFX.h> // Needs a little change in original Adafruit library (See README.txt file)
#include <SPI.h> // For SPI comm (needed for not getting compile error)
#include <Wire.h> // For I2C comm, but needed for not getting compile error
// Add Encoder Support
#include <Encoder.h>
// Display
#include <ESP_SSD1306.h> // Modification of Adafruit_SSD1306 for ESP8266 compatibility
#include <Adafruit_GFX.h> // Needs a little change in original Adafruit library (See README.txt file)
#include <SPI.h> // For SPI comm (needed for not getting compile error)
#include <Wire.h> // For I2C comm, but needed for not getting compile error
// Add Encoder Support
#include <Encoder.h>
// Display
#include <Adafruit_GFX.h> // Needs a little change in original Adafruit library (See README.txt file)
#include <SPI.h> // For SPI comm (needed for not getting compile error)
#include <Wire.h> // For I2C comm, but needed for not getting compile error
// LED Matrix
#include <Max72xxPanel.h>
// Add Encoder Support
Install Nodes.Js
https://nodejs.org/en/download/
Next do Angular Tutorial
https://angular.io/tutorial
From the command Line
=======================
npm install -g electron // Globally
int led =1 ;
int sensorValue = 5;
int status = false;
void setup() {
digitalWrite(led, true);
pinMode(led, OUTPUT);
}
void loop() {
#include "DigiKeyboard.h"
int led =1 ;
int sensorValue = 0;
int previousvalue=0;
void setup() {
// Just a example
}
void loop() {
npm start - local server
To build for production, i.e. Docker
npm run build:prod
docker build -t vizbox .
Angular CLI