DECIPHERING NOSTR AND IT'S PRIVATE KEYS

I’ve heard of https://nostr.com for about a year, but not until recently have I experimenting with it.

This post consists of my rough notes as I progressed to sending a nostr message. If you are interested in a bare minimum way to post events to nostr, read on.

Generate a new private key

$ openssl ecparam -name secp256k1 -genkey -out ec-priv.pem

The output here as the file extension notes is PEM:

RASPBERRY PI PICO WIRELESS & CIRCUITPYTHON

Was lucky enough to get my hands on a couple Raspberry Pi Pico W recently, and just finished up initial exploration.

I started with a by flashing the CircuitPython .UT2 to the pico, like always Adafruit has a phenomenal write up on just that.

Next I added copied in modules from the 8.x bundle, simply toss the following into your pico’s /lib/ directory:

$ ls -1 /Volumes/CIRCUITPY
boot_out.txt
code.py
lib
$ ls -1 /Volumes/CIRCUITPY/lib/
adafruit_httpserver.mpy
adafruit_requests.mpy

I also needed a .env file for wireless connections.

RASPBERRY PI PICO AND 433MHZ DATA RADIO

Well its been a minute since I’ve toyed around with electronics, but a $4 Raspberry Pi Pico board arriving in the mail changed that.

This board packs a boat load of utility for $4, just check out the data sheet and check out all them I2C and SPI pins!

I dusted off the last components I tinkered with, along with a handful of wires. After a couple days of tinkering, I ended up with a 433MHz radio packet receiver.

UNITY USER INTERFACE AND DIABLO STYLE INVENTORY

Well seems I forgot to share the most recent demo of my Unity project, I’m taking a break on it, but what I managed to accomplish makes me feel all warm and fuzzy.

DIABLO RPG STYLE INVENTORY SYSTEM IN UNITY

This weekend felt like a good time to tackle something new.

After successfully prototyping a 3D Disc Golf Game , and then a Game of Life-Simulation , I wanted to explore more of the user interface side.

I decided to build an Inventory management system, also decided it best to create a new project, this way I can build the Inventory as a re-usable module for more than one project.

It didn’t take much time for me to decide on a Diablo-style inventory where each item needs to fix within like a puzzle piece.

A GAME OF LIFE IN UNITY

Took a little break from my Disc Golf Game to do a bit of AI programming in Unity .

What I ended up with was a simple Game of Life with rabbits trying to survive. Each rabbit has a growing hunger and thirst which if not addressed will result in death. The population is also broken into male and female rabbits which can reproduce.

Check out a couple minutes of the simulation running at realtime speed:

3D DISC GOLF GAME IN UNITY PART 2

Put a little bit more effort into my Unity Disc Golf game. I’ve now got ambient sounds and footstep, plus throwing is much easier with only a single click input.

3D DISC GOLF GAME IN UNITY

Still working with Unity and Blender, now I’m use some of the knowledge I’ve gained to construct a physics based disc golf game.

At the moment I have 3 settings that effect the disc in flight ( fade , lift and power ), these settings can be seen at the lower corner of the screen, and can be changed using keyboard inputs. My thought is to use these as thresholds on different disc, then implement some sort of click game on each throw.

ANIMATED 3D ROBOT CHARACTER IN BLENDER

I’ve been brushing up on 3D modeling after a lot of Unity learning, here is a character I made that I actually like, hopefully it makes it into a Unity game sometime soon.


WIRELESS CHAT USING NRF24L01+ 2.4GHZ RF TRANSCEIVER ON ARDUINO & RASPBERRY PI UBUNTU LINUX

After a bit of success implementing an Arduino 2.4GHz Transceiver , I was encouraged to explore a more familiar environment, something with Python and Linux in the mix.

After a short period of research I landed on the circuitpython-nrf24l01 pypi project page, and quickly began digging through their examples .

It wasn’t long after I had a working prototype that mirrored my Arduino code quite closely:

Components

import sys
import select

from circuitpython_nrf24l01 import RF24
import board
import digitalio as dio

# addresses needs to be in a buffer protocol object (bytearray)
address = b'Nessy'

# change these (digital output) pins accordingly
ce = dio.DigitalInOut(board.D4)
csn = dio.DigitalInOut(board.D5)

# using board.SPI() automatically selects the MCU's
# available SPI pins, board.SCK, board.MOSI, board.MISO
spi = board.SPI()  # init spi bus object

# initialize the nRF24L01 on the spi bus object
nrf = RF24(spi, csn, ce, ask_no_ack=False, data_rate=250)
nrf.dynamic_payloads = False # this is the default in the TMRh20 arduino library
nrf.payload_length = 32

# get username
username = input('Enter Username: ')

# set address of RX node into a TX pipe
nrf.open_tx_pipe(address)

# set address of TX node into a RX pipe
nrf.open_rx_pipe(1, address)

nrf.listen = True

print('Welcome %s' % username)
while True:

    # handle write
    if select.select([sys.stdin,],[],[],0.0)[0]:
        nrf.listen = False
        for line in sys.stdin:
            msg = b'[%b] %b' % (username.encode(), line.rstrip().encode())
            nrf.send(msg)
            break

    # handle recieve
    if not nrf.listen:
        nrf.listen = True

    if nrf.any():
        # retreive the received packet's payload
        buffer = nrf.recv()
        data = buffer.decode().replace('\x00', '')
        print(data)