Skip to content

Instantly share code, notes, and snippets.

{
"4.67.0": {
"templates": "https://functionscdn.azureedge.net/public/TemplatesApi/3.1.1648.zip",
"workerRuntimes": {
"dotnet": {
"net6": {
"displayInfo": {
"displayName": ".NET 6.0",
"hidden": false,
"displayVersion": "v4",
// <auto-generated/>
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.Azure.Functions.Core;
using Microsoft.Azure.Functions.Worker.Core.FunctionMetadata;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
#include <WebUSB.h>
/**
* Creating an instance of WebUSBWebSerial will add an additional USB interface to
* the device that is marked as vendor-specific (rather than USB CDC-ACM) and
* is therefore accessible to the browser.
*
* The URL here provides a hint to the browser about what page the user should
* navigate to to interact with the device.
*/
import base64
import sys
import asyncio
import websockets
import cozmo
from cozmo.util import degrees
import time
from io import BytesIO
CMD_SPEAK = 0x01
@satvu
satvu / WeMoSwitch.js
Created April 26, 2018 16:55
WeMoSwitch server for Scratch 3.0 Extension
var express = require('express')
var app = express();
var Wemo = require('wemo-client');
var wemo = new Wemo();
var devices = [];
var client = undefined;
var cors = require('cors');
app.use(cors())