Skip to content

Instantly share code, notes, and snippets.

@SteveAmor
SteveAmor / gist:36c53be9cfc1fae8b89a25f0adf8653c
Created February 16, 2020 09:43
Using OpenOCD and GDB with nRF52832 (PineTime)
Based on the build from lupyuen/pinetime-rust-mynewt
Uses a Raspberry Pi to run OpenOCD which connects to the nRF52 with SMD
If required, GDB then runs on top of OpenOCD (OpenOCD has quite a few commands without GDB)
Start OpenOCD in a terminal window
Currently, I am using the lupyuen/pinetime-rust-mynewt script to flash the nRF52 app which then leaves OpenOCD running, wiating for connections on port 3333 & 4444
TODO - add instrutions to start OpenOCD on its own
pi@raspberrypi:~/pinetime-rust-mynewt $ openocd/bin/openocd -f scripts/nrf52-pi/swd-pi.ocd
def get_input_list():
return ['#1 @ 906,735: 28x17',
'#2 @ 890,926: 12x29',
'#3 @ 806,573: 20x19',
'#4 @ 73,196: 16x24',
'#5 @ 466,847: 26x27',
'#6 @ 157,631: 22x23',
'#7 @ 140,175: 18x11',
'#8 @ 847,845: 13x16',
'#9 @ 337,935: 25x24',
How to get an app onto your badge
Update your own fork of the repo with your app:
1. Fork the emfcamp/Mk4-Apps repo to your GitHub account
2. Clone your repo
3. Add your app to the root of your cloned repo
4. git add .
5. git commit -m "message"
6. git push origin master
@SteveAmor
SteveAmor / gist:436a208354052c2ad4f741556fe419b1
Created August 29, 2018 09:57
How to raise a pull request
Firstly, you will need a GitHub account if you haven't already got one, sign up now
@SteveAmor
SteveAmor / RetroPie with PiTop speakers
Created March 27, 2017 16:53
How to set up a PiTop CEED to run RetroPie using the PiTop speakers
RetroPie on PiTop with PiTop speaker (tested on CEED)
Connect a keyboard
Connect a game pad
Fresh boot from V4.1
Configure the game pad
Enable and connect WiFi in the RetroPie menu
Under the RetroPie Audio settings, force to HDMI and adjust the MIXER volume to max
# Normal and CEEDS
sudo apt-get update
sudo apt-get -y install mu
sudo apt-get -y install arduino
# For "Mapping the Weather"
sudo apt-get -y install python3-matplotlib
@SteveAmor
SteveAmor / gist:96422ea08891919224d67a2950a1315d
Last active January 21, 2017 10:22
Neopixels with Microbit MU refactoring
# Initial code
from microbit import *
import neopixel
np = neopixel.NeoPixel(pin0,16)
red = (64,0,0)
green = (0,64,0)
blue = (0,0,64)
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<title>Cheerlights</title>
</head>
<body>
<script>
setInterval(function() {
// get cheerlights color from field2 with a webservice call