Skip to content

Instantly share code, notes, and snippets.

@mrmabs
mrmabs / gemini-server.py
Last active May 26, 2025 18:41
Gemini Server for Pico W (and other Micropython platforms?)
# This script does not start networking, you will need to do that yourself or add network init to this file
#
# This is only a demo, but could easily be extended to switch on and off LEDs, display sensor data, etc...
#
# I created my certificates using this shell script: https://github.com/SvOlli/micropython-https-server/blob/master/cert/create_cert.sh
# And converted them using these commands:
# $ openssl rsa -outform der -in example.key -out example.der.key
# $ openssl x509 -outform der -in example.crt -out example.der.crt
#
# This script based on: https://github.com/micropython/micropython/blob/4d9e657f0ee881f4a41093ab89ec91d03613744d/examples/network/http_server_ssl.py
@mrmabs
mrmabs / i2c_gps_test.py
Created December 2, 2022 09:51
I2C ublox GPS/GNSS in MicroPython
# I could not find any useful examlpes of getting a ublox GNSS working
# in Micropython, so I wrote this one. My model is the SAM-M8Q and this
# code might also work with other ublox I2C GNSS modules.
#
# In this example I am using micropyGPS.py to parse the NMEA sentences.
# https://github.com/inmcm/micropyGPS
#
# Code is MIT licence
#
@mrmabs
mrmabs / i2c_kbd_test.py
Created November 22, 2022 13:42
Demo of BBQ20KBD on Pi Pico and Micropython
# After not being able to find any code for Micropython on the
# Pi Pico that I could use to operate my newly acquired BBQ20KBD
# from Solder Party on Tindie, I started experimenting and have
# this rough piece of code to prove that it is possible to
# communicate with the BBQ20KBD.
#
# My contributions are MIT Licenced, but understand that much of
# this code was pulled from multiple sources online, many without
# discernable licences.
#