MCPcopy Index your code
hub / github.com/conejoninja/gopherbadge

github.com/conejoninja/gopherbadge @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
108 symbols 324 edges 42 files 2 documented · 2%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Gopher Badge

TinyGo powered badge in the shape of your favorite burrowing rodent, the mighty Go Gopher.

https://gopherbadge.com

How to install

  • Install TinyGo using the instructions from https://tinygo.org

  • Clone this repo

  • Change directories into the directory with the repo

  • Connect your Gopherbadge to your computer using a USB cable

  • Run this command to compile and flash the code to your Gopher badge:

If you are running Mac or Linux, or have make installed you can run the following:

make flash

otherwise run tinygo directly

tinygo flash -target gopher-badge .

Note: if you get a permision denied error; please, consult this page for possible solution. You many need to restart the computer; afterward to get the group to stick.

  • To display a conference logo on your badge, use one of the following targets (depending on GC for Europe, Ireland, UK, or US):
make flash-gopherconeu
make flash-gopherconie
make flash-gopherconuk
make flash-gopherconus
  • To customize the Gobadge with your own name and information, use the NAME, TITLEA1, TITLEA2, MARQUEETOP, MARQUEEMIDDLE, MARQUEEBOTTOM, TITLEB1, TITLEB2 and QRTEXT variables like this:
make flash-gopherconeu NAME="@_CONEJO" TITLEA1="Go compiler" TITLEA2="small places"

Add an new logo

  • Create an image with a 320x240 pixels size, copy it into cmd/assets folder.
    For the moment only jpeg images are supported.
  • In cmd/main.go add the path to your file here
const (
tinygoLogo         = "./cmd/assets/tinygo.jpg"
purpleHardwareLogo = "./cmd/assets/purpleHardware.jpg"
gopherconEU        = "./cmd/assets/gopherconeu.jpg"
gopherconIE        = "./cmd/assets/gopherconie.jpg"
gopherconUK        = "./cmd/assets/gopherconuk.jpg"
gopherconUS        = "./cmd/assets/gopherconus.jpg"
wasmio             = "./cmd/assets/wasmio.jpg"
)
  • Add the corresponding flag to the conf map:
func confs() map[string]string {
    return map[string]string{
        "tinygo":      tinygoLogo,
        "purple":      purpleHardwareLogo,
        "gopherconeu": gopherconEU,
        "gopherconie": gopherconIE,
        "gopherconuk": gopherconUK,
        "gopherconus": gopherconUS,
        "wasmio":      wasmio,
    }
}

Add a new target to the Makefile:

flash-yourconf:
    go run cmd/main.go -conf=flagLogo
    tinygo flash -target gopher-badge .

You can run:

make flash-yourconf

It will store the data in logo.bin file that will be embedded into the code.

//go:embed logo.bin
var badgeLogo string

After the image has been generated, the make command will flash it to the board.

👏 Congratulations! It is now your own customized Gopher Badge.

Not powering up with battery connected

If your battery is connected and switching your badge to ON doesn't power it up, disconnect your battery, switch to ON and connect your battery again. If it doesn't power up, then check the battery charge.

Core symbols most depended-on inside this repo

getRainbowRGB
called by 25
badge.go
getFontWidthSize
called by 9
badge.go
handleNavigation
called by 7
badge.go
tone
called by 6
tutorial/basics/step7/main.go
Play
called by 5
snake.go
tone
called by 5
music.go
handleShiftedKey
called by 5
tutorial/flightbadge/main.go
drawSnakePartial
called by 4
tutorial/snake/step6/main.go

Shape

Function 84
Method 15
Struct 9

Languages

Go100%

Modules by API surface

snake.go17 symbols
badge.go12 symbols
tutorial/snake/step7/main.go8 symbols
tutorial/snake/step6/main.go6 symbols
tutorial/snake/step5/main.go5 symbols
tutorial/flightbadge/main.go5 symbols
cmd/logos/generate_logo_rgba.go5 symbols
adventure.go5 symbols
data.go4 symbols
rand.go3 symbols
tutorial/terminal/main.go2 symbols
tutorial/basics/step7/main.go2 symbols

For agents

$ claude mcp add gopherbadge \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact