Skip to content

Instantly share code, notes, and snippets.

View gerswin's full-sized avatar
🎯
Focusing

gerswin gerswin

🎯
Focusing
View GitHub Profile
import React from 'react';
import { Button, Image, View } from 'react-native';
import { ImagePicker } from 'expo';
export default class ImagePickerExample extends React.Component {
state = {
image: [],
};
render() {
/******************************************************************************
TestRun.ino
TB6612FNG H-Bridge Motor Driver Example code
Michelle @ SparkFun Electronics
8/20/16
https://github.com/sparkfun/SparkFun_TB6612FNG_Arduino_Library
Uses 2 motors to show examples of the functions in the library. This causes
a robot to do a little 'jig'. Each movement has an equal and opposite movement
so assuming your motors are balanced the bot should end up at the same place it
@gerswin
gerswin / sonoff.py
Last active April 13, 2019 07:21
sonoff custom component
# how to use
#light:
# - platform: sonoff
# host: "hassio ip"
# port: "1080"
import logging
import voluptuous as vol
"""
Support for command line covers.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/cover.command_line/
"""
import logging
import subprocess
import voluptuous as vol
homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
latitude: 5.4927
longitude: -73.4854
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric