This file contains hidden or 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 time | |
import serial | |
import math | |
from math import atan,pi,floor | |
import matplotlib.pyplot as plt | |
def plot_lidar(distdict): | |
x =[0 for i in range(360)] | |
y =[0 for i in range(360)] | |
for angle in range(0,360): |
This file contains hidden or 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
/dts-v1/; | |
/ { | |
model = "Khadas VIM3"; | |
amlogic-dt-id = "g12b_kvim3"; | |
compatible = "amlogic, g12b"; | |
interrupt-parent = <0x1>; | |
#address-cells = <0x2>; | |
#size-cells = <0x2>; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO_DIR1 = 23 | |
GPIO_PWM1 = 24 | |
GPIO_DIR2 = 27 | |
GPIO_PWM2 = 22 | |
This file contains hidden or 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 RPi.GPIO as GPIO | |
from time import sleep | |
GPIO.setmode(GPIO.BCM) | |
servoPin = 18 | |
GPIO.setup(servoPin, GPIO.OUT) | |
p = GPIO.PWM(servoPin, 50) # set to 50Hz |
This file contains hidden or 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 | |
import math | |
cap = cv2.VideoCapture(0) | |
size_x = 640 | |
size_y = 480 | |
cap.set(cv2.CAP_PROP_FRAME_WIDTH, size_x) |
This file contains hidden or 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 pyaudio | |
import wave | |
import audioop | |
import math | |
import os | |
CHUNK = 1024 | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 |
This file contains hidden or 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 requests | |
import json | |
api_key = "dd40631e0b2c53fdc84e1dffd1da95f6" | |
url = "http://api.openweathermap.org/data/2.5/weather?q=Seoul&appid={key}".format(key=api_key) | |
def main() : | |
res = requests.get(url) | |
res_json = json.loads(res.text) | |
temperature = round(res_json["main"]["temp"] - 273, 1) | |
humidity = round(res_json["main"]["humidity"]) |
This file contains hidden or 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
""" | |
This is a Python template for Alexa to get you building skills (conversations) quickly. | |
""" | |
from __future__ import print_function | |
# --------------- Helpers that build all of the responses ---------------------- | |
def build_speechlet_response(title, output, reprompt_text, should_end_session): |
NewerOlder