Skip to content

Instantly share code, notes, and snippets.

View amrithHN's full-sized avatar
🎯
Focusing

Amrith H Namboodiri amrithHN

🎯
Focusing
View GitHub Profile
@amrithHN
amrithHN / gist:16712bcc9d2189b70211b63bd785cd40
Created January 2, 2022 09:13
Python app to print a photo/image file using a default printer
import win32print
import win32ui
from PIL import Image, ImageWin
import sys
#print ("The script has the name %s" % (sys.argv[0])
PHYSICALWIDTH = 110
PHYSICALHEIGHT = 111
@amrithHN
amrithHN / gist:def122ad276935e2cba0e93a64caadfb
Created April 26, 2023 11:24
UART printf redirection stm32
/*# 1- Identify the UART interface, GPIO pins and Alternate Function #########*/
/* For example:
* B-L475E-IOT01A:
* PB6 ------> USART1_TX
* PB7 ------> USART1_RX
*
* NUCLEO-L476RG:
* PA2 ------> USART2_TX
* PA3 ------> USART2_RX
*