Fix for matplotlib error: TypeError: Couldn't find foreign struct converter for 'cairo.Context'
sudo apt-get install python3-cairocffi
sudo pip3 install cairocffi
sudo apt-get install python3-gi-cairo
import numpy as np | |
a = np.load("imgs_2017-05-02_21:12:18.npz") | |
a.shape | |
a[0] | |
a[0] | |
a | |
dir(a) | |
a.keys | |
a.keys() | |
a['arr_0'] |
Fix for matplotlib error: TypeError: Couldn't find foreign struct converter for 'cairo.Context'
sudo apt-get install python3-cairocffi
sudo pip3 install cairocffi
sudo apt-get install python3-gi-cairo
import time | |
import picamera | |
import numpy as np | |
from picamera import PiCamera | |
camera = PiCamera() | |
camera.resolution = (320, 240) | |
camera.framerate = 24 | |
time.sleep(2) | |
output = np.empty((240, 320, 3), dtype=np.uint8) | |
camera.capture(output, 'rgb') |
import matplotlib.pyplot as plt | |
import numpy as np | |
dfile = "imgs_2017-03-25_18:40:42.npz" | |
images = np.load(dfile)["arr_0"] | |
images.shape | |
plt.ion() | |
plt.figure() | |
plt.imshow(images[0].transpose((1,2,0))) |
// Copyright (c) Sandeep Mistry. All rights reserved. | |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | |
//TODO: Convert BLEPeripheral to use serial or SPI | |
//Import libraries (BLEPeripheral depends on SPI) | |
// #include <SPI.h> | |
#include <BLEPeripheral.h> | |
// define pins (varies per shield/board) | |
//TODO: Define pins for rn4871 and other Microchip chips |
https://github.com/RedBearLab/nRF8001/ |
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/rickanderson/Library/Arduino15/packages -hardware /Users/rickanderson/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/rickanderson/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/rickanderson/Documents/Arduino/libraries -fqbn=chipkit-core:pic32:fubarino_sd -ide-version=10611 -build-path /var/folders/bx/zg7wx2513knbft_4ch_p5m6c0000gp/T/build16074617a2b163c1c137bf4bd1209a5c.tmp -warnings=none -prefs=build.warn_data_percentage=75 -verbose /Users/rickanderson/projects/ricklon/autonomous/arduino/OTTOFullAutoDrive/OTTOFullAutoDrive.ino | |
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware - |
MPU9250 I AM 71 I should be 71 | |
MPU9250 is online... | |
x-axis self test: acceleration trim within : -1.4% of factory value | |
y-axis self test: acceleration trim within : -1.8% of factory value | |
z-axis self test: acceleration trim within : 0.8% of factory value | |
x-axis self test: gyration trim within : -0.7% of factory value | |
y-axis self test: gyration trim within : 0.1% of factory value | |
z-axis self test: gyration trim within : -0.7% of factory value | |
MPU9250 initialized for active data mode.... | |
AK8963 I AM 48 I should be 48 |
/* MPU9250 Basic Example Code | |
by: Kris Winer | |
date: April 1, 2014 | |
license: Beerware - Use this code however you'd like. If you | |
find it useful you can buy me a beer some time. | |
Modified by Brent Wilkins July 19, 2016 | |
Demonstrate basic MPU-9250 functionality including parameterizing the register | |
addresses, initializing the sensor, getting properly scaled accelerometer, | |
gyroscope, and magnetometer data out. Added display functions to allow display |
/* MPU9250 Basic Example Code | |
by: Kris Winer | |
date: April 1, 2014 | |
license: Beerware - Use this code however you'd like. If you | |
find it useful you can buy me a beer some time. | |
Modified by Brent Wilkins July 19, 2016 | |
Demonstrate basic MPU-9250 functionality including parameterizing the register | |
addresses, initializing the sensor, getting properly scaled accelerometer, | |
gyroscope, and magnetometer data out. Added display functions to allow display |