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
#!/bin/bash -x | |
#FIRST TIME SETUP | |
#install esp-open-sdk, Espressif ESP-IDF, and micropython dependencies | |
echo "Installing esp-open-sdk, Espressif ESP-IDF, and micropython dependencies..." | |
sudo apt-get update | |
sudo apt-get install -y build-essential git make unrar-free unzip \ | |
autoconf automake libtool libtool-bin gcc g++ gperf \ | |
flex bison texinfo gawk ncurses-dev libexpat-dev \ | |
python sed libreadline-dev libffi-dev pkg-config \ | |
help2man python-dev python-serial wget linux-image-extra-$(uname -r) |
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 time, socket | |
doc = """ | |
<!DOCTYPE html> | |
<html> | |
<head> <title>ESP8266 Pins</title> </head> | |
<body> <h1>ESP8266 Pins</h1> | |
<table border="1"> <tr><th>Pin</th><th>Value</th></tr> s </table> |
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 numpy as np | |
import matplotlib | |
def make_cmap_guassianHSV( num_segs = 100, #number of segments | |
bandwidth = 0.25, | |
red_center = 1.00, | |
green_center = 0.75, | |
blue_center = 0.50, | |
name = "gaussianHSV" | |
): |
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
from pylab import * | |
cdict = { | |
'red' : ((0.00, 0.00, 0.00), | |
(0.20, 0.00, 0.00), | |
(0.40, 0.00, 0.00), | |
(0.60, 0.00, 0.00), | |
(0.80, 1.00, 1.00), | |
(1.00, 1.00, 1.00)), | |
'green': ((0.00, 0.00, 0.00), | |
(0.20, 0.00, 0.00), |
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
################################################################################ | |
# this is code to compute NDVI from Blue (Visible channel) and Red (Infrared) | |
# such as pictures taken with "SuperBlue" camera | |
from PIL import Image | |
import numpy | |
img = Image.open("IMG_0512.JPG") | |
imgR, imgG, imgB = img.split() #get channels | |
#convert to double precision floating point..is this overkill? probably, could try 'float32' or 'float16' | |
arrR = numpy.asarray(imgR).astype('float64') |
NewerOlder