Skip to content

Instantly share code, notes, and snippets.

View tomeaton17's full-sized avatar

Tom Eaton tomeaton17

View GitHub Profile
#include <iostream>
#include <cstdlib>
#include <string>
#include<chrono>
#include<thread>
#include <boost/asio.hpp>
#include <boost/asio/serial_port.hpp>
using namespace std;
@tomeaton17
tomeaton17 / -
Created December 22, 2017 09:44
Performing configuration checks
- 32-bit : yes (cached)
- arm : yes (cached)
- symlinks supported : yes (cached)
error: No best alternative for libs/context/build/asm_sources
next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>clang
not matched
next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>gcc
not matched
#include <iostream>
#include <cstdlib>
#include <string>
#include <boost/asio.hpp>
#include <boost/asio/serial_port.hpp>
using namespace std;
int main(int argc, char** argv) {
@tomeaton17
tomeaton17 / -
Created December 13, 2017 09:58
[ 2459.250241] usb 1-2: new full-speed USB device number 11 using xhci_hcd
[ 2459.363506] usb 1-2: device descriptor read/64, error -71
[ 2459.583523] usb 1-2: device descriptor read/64, error -71
[ 2459.803492] usb 1-2: new full-speed USB device number 12 using xhci_hcd
[ 2459.916933] usb 1-2: device descriptor read/64, error -71
[ 2460.136774] usb 1-2: device descriptor read/64, error -71
[ 2460.356891] usb 1-2: new full-speed USB device number 13 using xhci_hcd
[ 2460.357170] usb 1-2: Device not responding to setup address.
[ 2460.563845] usb 1-2: Device not responding to setup address.
[ 2460.770097] usb 1-2: device not accepting address 13, error -71
@tomeaton17
tomeaton17 / coefficients.py
Created September 12, 2017 11:04
Calculates the Steinhart-Hart coefficients given 3 known resistance temperature pairs.
"""
Calculates the Steinhart-Hart coefficients for given resistance and temperature pairs.
"""
import sys
import math
titleString = """\
______ _ __ __ __ __ __ _____ _______ _ __
/ __/ /____ (_)__ / / ___ _____/ /_____/ // /__ _____/ /_ / ___/__ ___ / _/ _(_)___(_)__ ___ / /____
_\ \/ __/ -_) / _ \/ _ \/ _ `/ __/ __/___/ _ / _ `/ __/ __/ / /__/ _ \/ -_) _/ _/ / __/ / -_) _ \/ __(_-<
Linking build/project.elf
build/obj/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: In function `HAL_UART_Transmit_DMA':
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:964: undefined reference to `HAL_DMA_Start_IT'
build/obj/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: In function `HAL_UART_Receive_DMA':
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1035: undefined reference to `HAL_DMA_Start_IT'
build/obj/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.o: In function `HAL_UART_DMAStop':
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1156: undefined reference to `HAL_DMA_Abort'
/home/tom/shiny-octo/HAL/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c:1161: undefined reference to `HAL_DMA_Abort'
build/obj/main.o: In function `main':
/home/tom/shiny-octo/main.c:55: undefined reference to `HAL_UART_TransmitIT'
@tomeaton17
tomeaton17 / maximumpathsum.py
Created February 7, 2017 21:30
Not working
f = open("trianglepath.txt", "r")
triangle = []
newTriangle = []
for x in f.readlines():
triangle.append([int(n) for n in x.split(" ")])
print(triangle)
tempNumbers = 0
tempList = [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]
secondaryList = []
for z in range(len(triangle) -1, -1, -1):
@tomeaton17
tomeaton17 / lettercount.py
Created February 7, 2017 15:50
Doesn't work
import math
values1 = [0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8]
values2 = [0,3,6,6,5,5,5,7,6,6]
values3 = [0,10,10,12,11,11,10,12,12,11]
def returnLetterCount(n):
digits = int(len(str(n)))
letterCount = 0
if n < 20:
letterCount += values1[n]
@tomeaton17
tomeaton17 / lettercount.py
Created February 7, 2017 15:50
Not working
import math
values1 = [0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8]
values2 = [0,3,6,6,5,5,5,7,6,6]
values3 = [0,10,10,12,11,11,10,12,12,11]
def returnLetterCount(n):
digits = int(len(str(n)))
letterCount = 0
if n < 20:
letterCount += values1[n]
@tomeaton17
tomeaton17 / lettercount.py
Created February 7, 2017 15:49
Doesn't work
import math
values1 = [0,3,3,5,4,4,3,5,5,4,3,6,6,8,8,7,7,9,8,8]
values2 = [0,3,6,6,5,5,5,7,6,6]
values3 = [0,10,10,12,11,11,10,12,12,11]
def returnLetterCount(n):
digits = int(len(str(n)))
letterCount = 0
if n < 20:
letterCount += values1[n]