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
| from twilio.rest import Client | |
| import sys | |
| import os | |
| account = "" | |
| token = "" | |
| client = Client(account, token) | |
| def restart_program(): | |
| """Restarts the current program. |
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 program loops until a gps fix is achieved and then runs programs | |
| import gps | |
| import subprocess | |
| from squid import * | |
| import time | |
| import sys | |
| rgb = Squid(16, 20, 21) |
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
| # Example PPPD configuration for FONA GPRS connection on Debian/Ubuntu. | |
| # MUST CHANGE: Change the -T parameter value **** to your network's APN value. | |
| # For example if your APN is 'internet' (without quotes), the line would look like: | |
| # connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet" | |
| connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T wholesale" | |
| # MUST CHANGE: Uncomment the appropriate serial device for your platform below. | |
| # For Raspberry Pi use /dev/ttyAMA0 by uncommenting the line below: | |
| #/dev/ttyAMA0 |
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 threading | |
| from time import sleep | |
| import serial | |
| ser = serial.Serial('/dev/ttyGS0',115200) # GPIO Ports | |
| Enc_A1 = 24 # Encoder input A: input GPIO 4 | |
| Enc_B1 = 25 # Encoder input B: input GPIO 14 | |
| Button1 = 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 subprocess | |
| import time | |
| import datetime | |
| def get_file_name_pic(): # new | |
| return datetime.datetime.now().strftime("%Y-%m-%d_%H.%M.%S.jpg") | |
| while True: |
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 | |
| import subprocess | |
| import time | |
| import datetime | |
| def get_file_name_pic(): # new | |
| return datetime.datetime.now().strftime("%Y-%m-%d_%H.%M.%S-combined.png") | |
| subprocess.Popen("./raspi2png", cwd='/home/pi/raspi2png') |
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 judy | |
| import datetime | |
| import subprocess | |
| vin = judy.VoiceIn(adcdev='plughw:1,0', | |
| lm='/home/pi/judy/7470.lm', | |
| dict='/home/pi/judy/7470.dic') | |
| vout = judy.VoiceOut(device='plughw:0,0', | |
| resources='/home/pi/judy/resources/audio') |
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
| from analogio import AnalogIn | |
| from digitalio import DigitalInOut, Direction | |
| import board | |
| import busio | |
| import time | |
| import adafruit_dotstar | |
| analog0in = AnalogIn(board.D0) | |
| uart = busio.UART(board.D4, board.D3, baudrate=9600) | |
| numpix = 64 |
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
| var viewer = new Cesium.Viewer('cesiumContainer'); | |
| var options = { | |
| camera : viewer.scene.camera, | |
| canvas : viewer.scene.canvas | |
| }; | |
| //viewer.dataSources.add(Cesium.KmlDataSource.load('./sample.kml', options)); | |
| viewer.dataSources.add(Cesium.KmlDataSource.load('https://openlayers.org/en/v4.6.5/examples/data/kml/2012-02-10.kml', options)); |
OlderNewer