This file contains 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
// certificate for https://api.openai.com | |
// GlobalSign Root CA, valid until Fri Jan 28 2028, size: 1927 bytes | |
const char* root_ca_openai = \ | |
"-----BEGIN CERTIFICATE-----\n" \ | |
"MIIFYjCCBEqgAwIBAgIQd70NbNs2+RrqIQ/E8FjTDTANBgkqhkiG9w0BAQsFADBX\n" \ | |
"MQswCQYDVQQGEwJCRTEZMBcGA1UEChMQR2xvYmFsU2lnbiBudi1zYTEQMA4GA1UE\n" \ | |
"CxMHUm9vdCBDQTEbMBkGA1UEAxMSR2xvYmFsU2lnbiBSb290IENBMB4XDTIwMDYx\n" \ | |
"OTAwMDA0MloXDTI4MDEyODAwMDA0MlowRzELMAkGA1UEBhMCVVMxIjAgBgNVBAoT\n" \ | |
"GUdvb2dsZSBUcnVzdCBTZXJ2aWNlcyBMTEMxFDASBgNVBAMTC0dUUyBSb290IFIx\n" \ |
This file contains 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
#include "FunctionCall.h" | |
#include <Avatar.h> | |
#include <AudioGeneratorMP3.h> | |
#include <HTTPClient.h> | |
using namespace m5avatar; | |
extern Avatar avatar; | |
extern String speech_text; | |
extern String speech_text_buffer; | |
extern AudioGeneratorMP3 *mp3; |
This file contains 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
#!python2 | |
# coding: utf-8 | |
import cb | |
def s8(value): | |
return -(value & 0b10000000) | (value & 0b01111111) | |
class MyCentralManagerDelegate (object): | |
def __init__(self): | |
self.peripheral = None |
This file contains 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 very easy and simple inverted pendulum balancing robot" | |
You need only half a day to make it, if you have some Materials. | |
Copyright (C) 2014 ArduinoDeXXX All Rights Reserved. */ | |
//modified by robo8080 | |
#include "mbed.h" | |
Ticker tick; | |
//Timer t; | |
DigitalOut fwdL(PTD4); //2 | |
DigitalOut revL(PTA12); //3 |
This file contains 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
import cv2 | |
import numpy as np | |
cap = cv2.VideoCapture(0) | |
while(1): | |
# Take each frame | |
_, frame = cap.read() |
This file contains 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
/* | |
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleWrite.cpp | |
Ported to Arduino ESP32 by Evandro Copercini | |
*/ | |
/* | |
RCBController: | |
https://itunes.apple.com/us/app/rcbcontroller/id689724127 | |
http://rcbcontroller.micutil.com/ | |
*/ |
This file contains 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
/* | |
Example sketch for the PS3 Bluetooth library - developed by Kristian Lauszus | |
For more information visit my blog: http://blog.tkjelectronics.dk/ or | |
send me an e-mail: [email protected] | |
*/ | |
#include <PS3BT.h> | |
#include <usbhub.h> | |
// Satisfy IDE, which only needs to see the include statment in the ino. | |
#ifdef dobogusinclude |
This file contains 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
#MicroPython + Grove I2C motor driver | |
from microbit import * | |
#i2c.init(freq=100000, sda=pin20, scl=pin19) | |
while True: | |
# Forwards | |
print('Forwards') | |
display.show(Image.ARROW_N) | |
i2c.write(0x0f, bytearray([0x82,0x46,0x46])) |
This file contains 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
import cv2 | |
import numpy as np | |
cap = cv2.VideoCapture(0) | |
while(1): | |
# Take each frame | |
_, frame = cap.read() |
This file contains 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
import speech | |
from microbit import sleep | |
speech.say("I am a little robot", speed=92, pitch=60, throat=190, mouth=190) | |
sleep(1000) | |
speech.say("I am an elf", speed=72, pitch=64, throat=110, mouth=160) | |
sleep(1000) | |
speech.say("I am a news presenter", speed=82, pitch=72, throat=110, mouth=105) | |
sleep(1000) | |
speech.say("I am an old lady", speed=82, pitch=32, throat=145, mouth=145) |
NewerOlder