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
# data is a number from a sensor - it's either in base 10 or 16. Default is base 10, but it's sometimes 16. | |
# I want to return a decimal value no matter that the input base is. | |
# Thsi is micropython and I get this error | |
# ValueError: invalid syntax for integer with base 16 | |
def uint_le(data,base = 10): | |
val = struct.unpack('<H', data) | |
if (base == 10): | |
return (int(val[0])) | |
if (base == 16): | |
return int('val[0]',base) |
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 PIL import Image | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from skimage.io import imread | |
from skimage.transform import radon, iradon | |
from scipy.ndimage import zoom | |
basename = "projection_" | |
extention = ".jpeg" |
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
#include "stm32f4xx.h" | |
int main (void) | |
{ | |
RCC->AHB1RSTR |= RCC_AHB1RSTR_GPIODRST; // Reset GPIOD | |
RCC->AHB1RSTR = 0; // Exit reset state | |
RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN; // Enable GPIOD clock | |
GPIOD->MODER |= GPIO_MODER_MODER13_0; // Enable Output on D13 | |