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 Adafruit_BNO055 import BNO055 | |
# Create and configure the BNO sensor connection. | |
# Configure based on your IO configuration | |
# Raspberry Pi configuration with serial UART and RST connected to GPIO 18: | |
bno = BNO055.BNO055(serial_port='/dev/serial0', rst=18) | |
web_path ="/var/www/html/" | |
while True: | |
#Get readings from accelerometers | |
heading, roll, pitch = bno.read_euler() |
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
<html> | |
<head> | |
<script> | |
window.onload = function() { | |
console.log("LOADED"); | |
//Configuration variables | |
var updateInterval = 20 //in ms | |
var numberElements = 200; |
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 pytest | |
import boto3 | |
from faker import Faker | |
import random | |
from dotenv import load_dotenv, find_dotenv | |
import os | |
import pytest | |
# 1. Account created | |
# 2. User is deactivated |
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 boto3 | |
import toml | |
#read samconfig.toml | |
#find the stack name | |
#describe stack | |
# output resourceIDs as env file | |
env_path = './.env' |
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 | |
# Announces the IP addresses of connected Interfaces to slack | |
# loops until curl is able to successfully POST to the webook | |
WEBHOOK="https://hooks.slack.com/services/FOO/BAR" | |
IPs=$(ip -br address | awk -F "[ ]+" '/UP/{print " ", $1, $3}') | |
SERIAL=$(cat /proc/cpuinfo | awk -F "[: ]+" '/Serial/{print " ", $2}') | |
HOSTNAME=$(hostname) | |
until curl -s -X POST -H 'Content-type: application/json' --data "{\"text\":\"\n*Raspberry Pi now online*\n_Serial:_ $SERIAL\n_Host:_ $HOSTNAME\n_Interface addresses:_\n$IPs\"}" $WEBHOOK |
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
A Raspberry Pi4 with at least 4GB of Ram is recommended | |
Each version of ROS is tied to a specific release of Ubuntu. | |
We are going to use ROS2 Galactic which is tied to Ubuntu 20.4 Focal. | |
With full desktop support. | |
The Raspberry Pi foundations Pi Imager tool makes this easy. If you have not used it before, | |
you can download it from https://www.raspberrypi.com/software/ | |
--- IMPORTANT: select the 64 bit version of Ubuntu --- |