Loading files
1b73fd9c3This file is pinned to the selected release. Download the original to open it in your design tool.
<!DOCTYPE html>
<html lang="en" class="js csstransforms3d">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="generator" content="Hugo 0.49" />
<meta name="description" content="All about the NodeConf EU 2017 Badge">
<meta name="author" content="nearForm">
<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
<link rel="icon" href="/images/favicon.png" type="image/x-icon" />
<title>Other Code Samples :: NodeConf EU Badge</title>
<link href="/css/nucleus.css?1537939880" rel="stylesheet">
<link href="/css/font-awesome.min.css?1537939880" rel="stylesheet">
<link href="/css/hybrid.css?1537939880" rel="stylesheet">
<link href="/css/featherlight.min.css?1537939880" rel="stylesheet">
<link href="/css/perfect-scrollbar.min.css?1537939880" rel="stylesheet">
<link href="/css/auto-complete.css?1537939880" rel="stylesheet">
<link href="/css/theme.css?1537939880" rel="stylesheet">
<link href="/css/hugo-theme.css?1537939880" rel="stylesheet">
<script src="/js/jquery-2.x.min.js?1537939880"></script>
<style type="text/css">
:root #header + #content > #left > #rlblock_left{
display:none !important;
}
</style>
</head>
<body class="" data-url="/getting-started/other-code-samples/">
<nav id="sidebar" class="">
<div id="header-wrapper">
<div id="header">
<a href="/"><img src="/images/logo.png" /></a>
</div>
<div class="searchbox">
<label for="search-by"><i class="fa fa-search"></i></label>
<input data-search-input id="search-by" type="text" placeholder="Search...">
<span data-search-clear=""><i class="fa fa-close"></i></span>
</div>
<script type="text/javascript" src="/js/lunr.min.js?1537939880"></script>
<script type="text/javascript" src="/js/auto-complete.js?1537939880"></script>
<script type="text/javascript">
var baseurl = "http:\/\/nodeconfeubadge.org";
</script>
<script type="text/javascript" src="/js/search.js?1537939880"></script>
</div>
<div class="highlightable">
<ul class="topics">
<li data-nav-id="/getting-started/" title="Getting Started" class="dd-item
parent
">
<a href="/getting-started/">
Getting Started
</a>
<ul>
<li data-nav-id="/getting-started/unlocking-your-badge/" title="Unlocking Your Badge" class="dd-item ">
<a href="/getting-started/unlocking-your-badge/">
Unlocking Your Badge
</a>
</li>
<li data-nav-id="/getting-started/built-in-software/" title="Built-in Software" class="dd-item ">
<a href="/getting-started/built-in-software/">
Built-in Software
</a>
</li>
<li data-nav-id="/getting-started/connecting-to-the-badge/" title="Connecting to the Badge" class="dd-item ">
<a href="/getting-started/connecting-to-the-badge/">
Connecting to the Badge
</a>
</li>
<li data-nav-id="/getting-started/hello-world-console/" title="Hello World on the Console" class="dd-item ">
<a href="/getting-started/hello-world-console/">
Hello World on the Console
</a>
</li>
<li data-nav-id="/getting-started/other-code-samples/" title="Other Code Samples" class="dd-item active">
<a href="/getting-started/other-code-samples/">
Other Code Samples
</a>
</li>
<li data-nav-id="/getting-started/accessing-hardware-features/" title="Accessing Hardware Features" class="dd-item ">
<a href="/getting-started/accessing-hardware-features/">
Accessing Hardware Features
</a>
</li>
<li data-nav-id="/getting-started/using-prototyping-area/" title="Using the prototyping area and corners" class="dd-item ">
<a href="/getting-started/using-prototyping-area/">
Using the prototyping area and corners
</a>
</li>
<li data-nav-id="/getting-started/faq/" title="FAQ" class="dd-item ">
<a href="/getting-started/faq/">
FAQ
</a>
</li>
</ul>
</li>
<li data-nav-id="/challenges/" title="Challenges" class="dd-item
">
<a href="/challenges/">
Challenges
</a>
<ul>
<li data-nav-id="/challenges/hello-world-screen/" title="Hello World on screen" class="dd-item ">
<a href="/challenges/hello-world-screen/">
Hello World on screen
</a>
</li>
<li data-nav-id="/challenges/detect-button-press/" title="Detect Button Press" class="dd-item ">
<a href="/challenges/detect-button-press/">
Detect Button Press
</a>
</li>
<li data-nav-id="/challenges/detect-capacitive-touch/" title="Detect Capacitive Touch" class="dd-item ">
<a href="/challenges/detect-capacitive-touch/">
Detect Capacitive Touch
</a>
</li>
<li data-nav-id="/challenges/flash-leds/" title="Flash LEDs" class="dd-item ">
<a href="/challenges/flash-leds/">
Flash LEDs
</a>
</li>
<li data-nav-id="/challenges/play-music-with-buzzer/" title="Play Music with Buzzer" class="dd-item ">
<a href="/challenges/play-music-with-buzzer/">
Play Music with Buzzer
</a>
</li>
<li data-nav-id="/challenges/on-screen-menu/" title="On-Screen Menu" class="dd-item ">
<a href="/challenges/on-screen-menu/">
On-Screen Menu
</a>
</li>
<li data-nav-id="/challenges/broadcast-nfc-url/" title="Broadcast NFC URL" class="dd-item ">
<a href="/challenges/broadcast-nfc-url/">
Broadcast NFC URL
</a>
</li>
<li data-nav-id="/challenges/broadcast-beacons/" title="Broadcast Beacons" class="dd-item ">
<a href="/challenges/broadcast-beacons/">
Broadcast Beacons
</a>
</li>
<li data-nav-id="/challenges/use-noble-on-laptop/" title="Use Noble on Laptop" class="dd-item ">
<a href="/challenges/use-noble-on-laptop/">
Use Noble on Laptop
</a>
</li>
<li data-nav-id="/challenges/use-badge-for-hid/" title="Use the Badge as a HID Button" class="dd-item ">
<a href="/challenges/use-badge-for-hid/">
Use the Badge as a HID Button
</a>
</li>
<li data-nav-id="/challenges/display-an-image/" title="Display an Image" class="dd-item ">
<a href="/challenges/display-an-image/">
Display an Image
</a>
</li>
<li data-nav-id="/challenges/create-web-bluetooth-page/" title="Create a Web Bluetooth Page" class="dd-item ">
<a href="/challenges/create-web-bluetooth-page/">
Create a Web Bluetooth Page
</a>
</li>
<li data-nav-id="/challenges/detect-person-with-pir-sensor/" title="Detect movement with a PIR Sensor" class="dd-item ">
<a href="/challenges/detect-person-with-pir-sensor/">
Detect movement with a PIR Sensor
</a>
</li>
<li data-nav-id="/challenges/connect-to-ble-lightbulb/" title="Connect to BLE Lightbulb" class="dd-item ">
<a href="/challenges/connect-to-ble-lightbulb/">
Connect to BLE Lightbulb
</a>
</li>
<li data-nav-id="/challenges/connect-to-ble-led-strip/" title="Connect to BLE LED Strip" class="dd-item ">
<a href="/challenges/connect-to-ble-led-strip/">
Connect to BLE LED Strip
</a>
</li>
<li data-nav-id="/challenges/communicate-with-another-badge/" title="Communicate with another Badge" class="dd-item ">
<a href="/challenges/communicate-with-another-badge/">
Communicate with another Badge
</a>
</li>
<li data-nav-id="/challenges/communicate-with-other-ble-device/" title="Communicate with another Device" class="dd-item ">
<a href="/challenges/communicate-with-other-ble-device/">
Communicate with another Device
</a>
</li>
<li data-nav-id="/challenges/implement-dat-protocol/" title="Implement Dat Protocol" class="dd-item ">
<a href="/challenges/implement-dat-protocol/">
Implement Dat Protocol
</a>
</li>
</ul>
</li>
<li data-nav-id="/workshop/" title="Workshop" class="dd-item
">
<a href="/workshop/">
Workshop
</a>
<ul>
<li data-nav-id="/workshop/get-connected/" title="Get Connected" class="dd-item ">
<a href="/workshop/get-connected/">
Get Connected
</a>
</li>
<li data-nav-id="/workshop/clean-slate/" title="Clean Slate" class="dd-item ">
<a href="/workshop/clean-slate/">
Clean Slate
</a>
</li>
<li data-nav-id="/workshop/capacitive-sense/" title="Capacitive Sense" class="dd-item ">
<a href="/workshop/capacitive-sense/">
Capacitive Sense
</a>
</li>
<li data-nav-id="/workshop/graphics/" title="Graphics" class="dd-item ">
<a href="/workshop/graphics/">
Graphics
</a>
</li>
<li data-nav-id="/workshop/sound/" title="Sound" class="dd-item ">
<a href="/workshop/sound/">
Sound
</a>
</li>
<li data-nav-id="/workshop/making-a-game/" title="Making a Game" class="dd-item ">
<a href="/workshop/making-a-game/">
Making a Game
</a>
</li>
<li data-nav-id="/workshop/what-next/" title="What next?" class="dd-item ">
<a href="/workshop/what-next/">
What next?
</a>
</li>
<li data-nav-id="/workshop/adding-to-the-menu/" title="Adding to your Badge's menu" class="dd-item ">
<a href="/workshop/adding-to-the-menu/">
Adding to your Badge's menu
</a>
</li>
</ul>
</li>
</ul>
<section id="footer">
<p>Built using the
<a href="https://github.com/matcornic/hugo-theme-learn">Learn</a> theme on
<a href="http://gohugo.io/">Hugo</a> ported from
<a href="http://getgrav.org">Grav</a>.
</p>
</section>
</div>
</nav>
<section id="body">
<div id="overlay"></div>
<div class="padding highlightable sticky-parent">
<div class="sticky-spacer">
<div id="top-bar">
<div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
<span id="sidebar-toggle-span">
<a href="#" id="sidebar-toggle" data-sidebar-toggle="">
<i class="fa fa-bars"></i>
</a>
</span>
<span id="toc-menu"><i class="fa fa-list-alt"></i></span>
<span class="links">
<a href='/'></a> > <a href='/getting-started/'>Getting Started</a> > Other Code Samples
</span>
</div>
<div class="progress">
<div class="wrapper">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#badge-repo-code">Badge Repo Code</a>
<ul>
<li><a href="#games">Games</a></li>
<li><a href="#web-bluetooth">Web Bluetooth</a></li>
<li><a href="#misc">Misc</a></li>
</ul></li>
</ul></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div id="body-inner">
<h1>Other Code Samples</h1>
<p>There are three places you can find code to learn from and use:</p>
<ul>
<li>The <a href="https://github.com/nearform/nceubadge">Badge repo</a></li>
<li>The <a href="https://www.espruino.com/">main Espruino site</a></li>
<li>The <a href="https://www.espruino.com/Puck.js">Puck.js area</a> of the Espruino site</li>
</ul>
<h2 id="badge-repo-code">Badge Repo Code</h2>
<p>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.</p>
<ul>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/flasher/main.js">Pre-installed badge code</a></li>
</ul>
<h3 id="games">Games</h3>
<p>Relive your original Gameboy, Nokia and video arcade days with the following games :-)</p>
<ul>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/flappybird.js">Flappy Bird</a></li>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/snake.js">Snake</a></li>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/mario.js">Simple Mario</a></li>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/asteroids.js">Asteroids</a></li>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/click_counter.js">Click speed counter</a></li>
<li><a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/trex.js">T-Rex</a></li>
</ul>
<h3 id="web-bluetooth">Web Bluetooth</h3>
<ul>
<li><a href="https://github.com/nearform/nceubadge/blob/master/web_bluetooth/badge_images.html">Retrieve all images stored on a badge</a> (<a href="/web_bluetooth/badge_images.html">try it</a>)</li>
<li><a href="https://github.com/nearform/nceubadge/blob/master/web_bluetooth/badge_photo.html">Take a picture with getUserMedia and put it on the badge</a> (<a href="/web_bluetooth/badge_photo.html">try it</a>)</li>
<li><a href="https://github.com/nearform/nceubadge/blob/master/web_bluetooth/badge_upload.html">Upload an image to the badge badge</a> (<a href="/web_bluetooth/badge_upload.html">try it</a>)</li>
</ul>
<h3 id="misc">Misc</h3>
<ul>
<li><p>Check out the <a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/repl.js">world’s most awkward REPL</a></p></li>
<li><p>Learn how to <a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/menu.js">display a Menu</a></p></li>
<li><p>Dazzle everyone with your artistic skills on an <a href="https://www.espruino.com/ide/#https://raw.githubusercontent.com/nearform/nceubadge/master/sketch.js">Etch-a-sketch</a></p></li>
</ul>
<footer class=" footline" >
</footer>
</div>
</div>
<div id="navigation">
<a class="nav nav-prev" href="/getting-started/hello-world-console/" title="Hello World on the Console"> <i class="fa fa-chevron-left"></i></a>
<a class="nav nav-next" href="/getting-started/accessing-hardware-features/" title="Accessing Hardware Features" style="margin-right: 0px;"><i class="fa fa-chevron-right"></i></a>
</div>
</section>
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
</div>
<script src="/js/clipboard.min.js?1537939880"></script>
<script src="/js/perfect-scrollbar.min.js?1537939880"></script>
<script src="/js/perfect-scrollbar.jquery.min.js?1537939880"></script>
<script src="/js/jquery.sticky-kit.min.js?1537939880"></script>
<script src="/js/featherlight.min.js?1537939880"></script>
<script src="/js/html5shiv-printshiv.min.js?1537939880"></script>
<script src="/js/highlight.pack.js?1537939880"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script src="/js/modernizr.custom.71422.js?1537939880"></script>
<script src="/js/learn.js?1537939880"></script>
<script src="/js/hugo-learn.js?1537939880"></script>
<link href="/mermaid/mermaid.css?1537939880" type="text/css" rel="stylesheet" />
<script src="/mermaid/mermaid.js?1537939880"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
</body>
</html>