Loading files
---
title: "Other Code Samples"
weight: 7
date: 2017-10-28T15:30:33+01:00
draft: false
---
There are three places you can find code to learn from and use:
* The [Badge repo](https://github.com/nearform/nceubadge)
* The [main Espruino site](https://www.espruino.com/)
* The [Puck.js area](https://www.espruino.com/Puck.js) of the Espruino site
## Badge Repo Code
The pre-installed main.js code is a treasure trove of useful snippets. Note however that it's too big to be uploaded in its entirety via the Web IDE.
* [Pre-installed badge code](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/flasher/main.js)
### Games
Relive your original Gameboy, Nokia and video arcade days with the following games :-)
* [Flappy Bird](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/flappybird.js)
* [Snake](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/snake.js)
* [Simple Mario](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/mario.js)
* [Asteroids](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/asteroids.js)
* [Click speed counter](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/click_counter.js)
* [T-Rex](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/trex.js)
### Web Bluetooth
* [Retrieve all images stored on a badge](https://github.com/nearform/nceubadge/blob/master/web_bluetooth/badge_images.html) ([try it](/web_bluetooth/badge_images.html))
* [Take a picture with getUserMedia and put it on the badge](https://github.com/nearform/nceubadge/blob/master/web_bluetooth/badge_photo.html) ([try it](/web_bluetooth/badge_photo.html))
* [Upload an image to the badge badge](https://github.com/nearform/nceubadge/blob/master/web_bluetooth/badge_upload.html) ([try it](/web_bluetooth/badge_upload.html))
### Misc
* Check out the [world's most awkward REPL](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/repl.js)
* Learn how to [display a Menu](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/menu.js)
* Dazzle everyone with your artistic skills on an [Etch-a-sketch](https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/sketch.js)
1b73fd9c3This file is pinned to the selected release. Download the original to open it in your design tool.