Skip to content

Instantly share code, notes, and snippets.

@stonehippo
stonehippo / wio_terminal_cricuitpython_rtl_support_notes.md
Last active March 6, 2024 13:22
Working notes for getting Seeed WIO Terminal WiFi & BLE working with CircuitPython

CircuitPython support for WiFi and Bluetooth LE on Seeed WIO Terminal

Context

The Seeed WIO Terminal is generally supported by CircuitPython, but there is no implementation for access to the WiFi or Bluetooth LE networking functions on the board. After taking a look at the Arduino support for these features, I can see that the RealTek RTL8720D is set up to be driven by a UART connection from the SAMD51 that acts as the main controller for the WIO Terminal. In other words, the RTL8720D is set up as a co-processor, similar to the ESP32 in Adafruit's Airlift modules.

The UART driver is based on an embedded remote procedure call (eRPC) library on the Arduino side. This is good news, because it means that there is a chance that the driver can be implemented in CP! In theory, this can be built o

@stonehippo
stonehippo / wio-terminal-circuitpython.md
Last active February 13, 2024 13:32
Using CircuitPython modules to work with the Seeed Wio Terminal

Seeed Wio Terminal Circuitpython Modules

note: All of these examples have been tested with the latest version of CircuitPython, which as of this writing was 7.2.4. Some of these examples may require tweaks in older or later versions, due to change in the drivers.

The Seeed Wio Terminal is a nifty connected device development kit. Built around a SAMD51 Cortex-M4 microcontroller and a Realtek RTL8720DN for WiFi and Bluetooth, plus an integrated display and a collection of handy sensors, the Wio Terminal is a great platform for IoT and smart device development.

One of the nice things about the Wio Terminal is the number of options available for developement platforms. You can choose the long-time hardware hacking favorite Arudino, MicroPython or Ardupy, an interesting blend of MicroPython and Arduino. And there's support for my

@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@wangruohui
wangruohui / intel-nvidia.md
Last active April 25, 2024 10:38
Intel for display, Nvidia for computing

Intel for display, NVIDIA for computing

This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 / 20.04 desktop.

I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti. Both of them can be shown via lspci | grep VGA.

00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
@marcan
marcan / canon-ef-protocol-notes.md
Last active May 7, 2024 16:22
Canon EF protocol notes

Testing done using a Canon EOS 600D and a Canon EF-S18-55mm f/3.5-5.6 IS II.

Pinout

  1. VBAT
  2. DET (common with P-GND on lens side)
  3. P-GND
  4. VDD
  5. DCL
  6. DLC
@jcconnell
jcconnell / USG_OpenVPN_Radius_Auth.md
Last active August 28, 2023 09:04
Unifi Security Gateway (USG) OpenVPN server with RADIUS authentication

Last Updated: 8/30/18

Details

I wanted to run an OpenVPN server on the USG. Since it has a Radius server built in, I figured this would be a much better way to handle OpenVPN authentication. Make sure you have the Radius server enabled on your USG under Settings > Services > Radius > Server in the controller. Add OpenVpn users under Settings > Services > Radius > Server.

Thanks to the following resources in helping to configure this:

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@stecman
stecman / _readme.md
Last active April 25, 2024 00:10
Brother P-Touch PT-P300BT bluetooth driver python

Controlling the Brother P-Touch Cube label maker from a computer

The Brother PTP300BT label maker is intended to be controlled using the official Brother P-Touch Design & Print iOS/Android app. The app has arbitrary limits on what you can print (1 text object and up to 3 preset icons), so I thought it would be a fun challenge to reverse engineer the protocol to print whatever I wanted.

Python code at the bottom if you want to skip the fine details.

Process

Intitially I had a quick peek at the Android APK to see if there was any useful information inside. The code that handles the communication with the printer in Print&Design turned out to be a native library, but the app clearly prepares a bitmap image and passes it to this native library for printing. Bitmaps are definitely something we can work with.

@mrtns
mrtns / README.md
Last active January 14, 2023 05:07
Markdown-based Literate Programming

R Ecosystem

  • R Markdown

    Use a productive notebook interface to weave together narrative text and code to produce elegantly formatted output. Use multiple languages including R, Python, and SQL.

Python Ecosystem

  • Pweave

    Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.

  • podoc
@smoser
smoser / README.md
Last active March 7, 2022 15:34
Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default

Ubuntu Grub Boot Kernel

Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default.

This allows you to pick what kernel you want to boot on next reboot, or set the default, without having to know much about how grub works or editing config files.

Usage

  Usage: boot-kernel [options] [kernel]

call grub-reboot or grub-set-default to boot the provided kernel.