Skip to content

Instantly share code, notes, and snippets.

@robo8080
robo8080 / cloud_vision_label_test.py
Last active July 13, 2017 06:33
cloud_vision_label_test.py
#!python2
# -*- coding: utf-8 -*-
import requests
import json
import base64
import os
import photos
import console
@robo8080
robo8080 / cloud_vision_label_speech.py
Last active May 16, 2021 01:54
cloud_vision_label_speech.py
#!python2
# -*- coding: utf-8 -*-
import requests
import json
import base64
import photos
import console
import speech
@robo8080
robo8080 / cloud_vision_face_test.py
Created July 22, 2017 01:52
cloud_vision_face_test.py
#!python2
# -*- coding: utf-8 -*-
import requests
import json
import base64
import photos
import console
from PIL import Image, ImageDraw
/*
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: kristianl@tkjelectronics.com
*/
#include <PS3BT.h>
#include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
/*
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: kristianl@tkjelectronics.com
*/
#include <PS3BT.h>
#include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
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)
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
# Take each frame
_, frame = cap.read()
#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]))
/*
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: kristianl@tkjelectronics.com
*/
#include <PS3BT.h>
#include <usbhub.h>
// Satisfy IDE, which only needs to see the include statment in the ino.
#ifdef dobogusinclude
/*
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/
*/