Skip to content

Instantly share code, notes, and snippets.

@jshep321
jshep321 / test1.ino
Last active February 1, 2021 18:17
Test filtering in ArduinoJson library on ESP32
#include <Arduino.h>
#include <ArduinoJson.h>
void setup() {
Serial.begin(115200);
delay(1000);
int waittime = 3; //wait in seconds
Serial.println("Waiting " + String(waittime) + " seconds");
for (int i=0; i<waittime; i++)
{
@jshep321
jshep321 / sendutt.py
Last active December 2, 2019 21:47
send a remote "utterance" (voice command) to mycroft as if spoken locally
#! /usr/bin/env python
# Purpose: Sends an utterance to mycroft as if spoken
# Usage: python sendutt.py "utterance string goes here"
# Example usage from command line: python sendutt.py "what time is it"
#example data format--> data ='{"utterances": ["what time is it"],"lang":"en-us"}'
#example message format--> message = '{"type": "' + type + '", "data": ' + data +'}'
#example fully spelled out websocket message-->
# result = ws.send('{"type": "'"recognizer_loop:utterance"'", "data": ''{"utterances": ["what time is it"],"lang":"en-us"}''}')