<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GoBadge | Go Education Project</title><link>https://goeducation.net/docs/gobadge/</link><atom:link href="https://goeducation.net/docs/gobadge/index.xml" rel="self" type="application/rss+xml"/><description>GoBadge</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><image><url>https://goeducation.net/media/logo.svg</url><title>GoBadge</title><link>https://goeducation.net/docs/gobadge/</link></image><item><title>Step-by-step Tutorial</title><link>https://goeducation.net/docs/gobadge/tutorial/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://goeducation.net/docs/gobadge/tutorial/</guid><description>&lt;h2 id="what-you-need"&gt;What you need&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;- GoBadge aka Adafruit PyBadge
- Personal computer with Go 1.18/1.19 and TinyGo installed, and a serial port.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;h3 id="go"&gt;Go&lt;/h3&gt;
&lt;p&gt;If somehow you have not installed Go on your computer already, you can download it here:&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;Now you are ready to install TinyGo.&lt;/p&gt;
&lt;h3 id="tinygo"&gt;TinyGo&lt;/h3&gt;
&lt;p&gt;Follow the instructions here for your operating system:&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h2 id="connecting-the-gobadge-to-your-computer"&gt;Connecting the GoBadge to your computer&lt;/h2&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="welcome.jpg" alt="welcome to gopher badge" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Plug the GoBadge into your computer using a USB cable. There may be one provided in your starter kit.&lt;/p&gt;
&lt;p&gt;Make sure that the GoBadge is on.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="on_off.jpg" alt="on off switch" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="running-the-code"&gt;Running the code&lt;/h2&gt;
&lt;p&gt;The TinyGo programs will run directly on the GoBadge&amp;rsquo;s microcontroller. The procedure is basically:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Edit your TinyGo program.&lt;/li&gt;
&lt;li&gt;Compile and flash it to your GoBadge.&lt;/li&gt;
&lt;li&gt;The program executes from the GoBadge. You can disconnect the GoBadge from your computer (plug it into a battery, if it isn&amp;rsquo;t already), the program executes directly on the microcontroller.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;rsquo;s get started!&lt;/p&gt;
&lt;h2 id="code"&gt;Code&lt;/h2&gt;
&lt;h3 id="step0go---built-in-led"&gt;step0.go - Built-in LED&lt;/h3&gt;
&lt;p&gt;This tests that you can compile and flash your PyBadge with TinyGo code, by blinking the built-in LED (it&amp;rsquo;s on the back).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="getting_flashed.jpg" alt="flashing the board" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;Once the PyBadge is flashed correctly, the built-in LED labeled &amp;ldquo;D13&amp;rdquo; (on the back) should start to turn on and off once per second. Now everything is setup correctly and you are ready to continue.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="step 0"
srcset="https://goeducation.net/docs/gobadge/tutorial/step0_hu_b26391db31c0b6bb.webp 320w, https://goeducation.net/docs/gobadge/tutorial/step0_hu_a23df71c6459aba.webp 480w, https://goeducation.net/docs/gobadge/tutorial/step0_hu_ecccebb162cbc591.webp 500w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://goeducation.net/docs/gobadge/tutorial/step0_hu_b26391db31c0b6bb.webp"
width="500"
height="401"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="step1go---built-in-led-start-button"&gt;step1.go - Built-in LED, START Button&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When you press the START button, the built-in LED should turn on.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="start button"
srcset="https://goeducation.net/docs/gobadge/tutorial/step1_hu_9ad8ebab6e0a426d.webp 320w, https://goeducation.net/docs/gobadge/tutorial/step1_hu_aee6b80dcc238930.webp 480w, https://goeducation.net/docs/gobadge/tutorial/step1_hu_d81a35e042eb966.webp 500w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://goeducation.net/docs/gobadge/tutorial/step1_hu_9ad8ebab6e0a426d.webp"
width="500"
height="372"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Challenge:&lt;/em&gt;
See if you can modify
so that the LED turns on if
the &lt;em&gt;SELECT&lt;/em&gt; button is pressed instead of the &lt;em&gt;START&lt;/em&gt; button.&lt;/p&gt;
&lt;h3 id="step2go---neopixels"&gt;step2.go - Neopixels&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="step 2 location"
srcset="https://goeducation.net/docs/gobadge/tutorial/step2_hu_6d089e2f0d9946d5.webp 320w, https://goeducation.net/docs/gobadge/tutorial/step2_hu_a182839c7ac14afb.webp 480w, https://goeducation.net/docs/gobadge/tutorial/step2_hu_450e19b53091fe9f.webp 500w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://goeducation.net/docs/gobadge/tutorial/step2_hu_6d089e2f0d9946d5.webp"
width="500"
height="368"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The 5 neopixels should light up green and red alternatively.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="step 2"
src="https://goeducation.net/docs/gobadge/tutorial/step2.gif"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="step3go---neopixels-buttons"&gt;step3.go - Neopixels, Buttons&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The 5 neopixels should light up in different colors depending on which button you press.&lt;/p&gt;
&lt;p&gt;What happens if you press more than one button at a time?&lt;/p&gt;
&lt;p&gt;try out &lt;code&gt;./step3b&lt;/code&gt;, what does it do?&lt;/p&gt;
&lt;p&gt;After deploying it should look like this:&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="step3b"
src="https://goeducation.net/docs/gobadge/tutorial/step3b.gif"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="step4go---light-sensor-neopixels"&gt;step4.go - Light sensor, Neopixels&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="step5go---display"&gt;step5.go - Display&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step5/main.go
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The message &amp;ldquo;Hello Gophers!&amp;rdquo; should appear on the display.&lt;/p&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="step5"
srcset="https://goeducation.net/docs/gobadge/tutorial/step5_hu_cf6caa43180ebcd7.webp 320w, https://goeducation.net/docs/gobadge/tutorial/step5_hu_c32ebc95b3c2ed61.webp 480w, https://goeducation.net/docs/gobadge/tutorial/step5_hu_3eac21abe2afec23.webp 500w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://goeducation.net/docs/gobadge/tutorial/step5_hu_cf6caa43180ebcd7.webp"
width="500"
height="348"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="step6go---display-buttons"&gt;step6.go - Display, Buttons&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step6/main.go
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="step6"
srcset="https://goeducation.net/docs/gobadge/tutorial/step6_hu_23ff3c6913231b3c.webp 320w, https://goeducation.net/docs/gobadge/tutorial/step6_hu_289cfa1a7cc7cfc6.webp 480w, https://goeducation.net/docs/gobadge/tutorial/step6_hu_9d2a876f3cc779bd.webp 500w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://goeducation.net/docs/gobadge/tutorial/step6_hu_23ff3c6913231b3c.webp"
width="500"
height="344"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The display will show some blue circle that represent that buttons on the board.
When a button is pressed a ring will be shown around its corresponding circle.&lt;/p&gt;
&lt;h3 id="step7go---display-accelerometer"&gt;step7.go - Display, Accelerometer&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step7
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="step7"
srcset="https://goeducation.net/docs/gobadge/tutorial/step7_hu_861ab5507ddd0432.webp 320w, https://goeducation.net/docs/gobadge/tutorial/step7_hu_b2e85f84de8de6e4.webp 480w, https://goeducation.net/docs/gobadge/tutorial/step7_hu_cf1cabe688e01fff.webp 500w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://goeducation.net/docs/gobadge/tutorial/step7_hu_861ab5507ddd0432.webp"
width="500"
height="322"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The display will show a bar for each X,Y,Z axis. Move the Pybadge to see it in action.&lt;/p&gt;
&lt;h3 id="step8go---buzzer-buttons"&gt;step8.go - Buzzer, Buttons&lt;/h3&gt;
&lt;p&gt;Run the code.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tinygo flash -target gobadge ./step8/main.go
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Press the buttons and create your melody.&lt;/p&gt;
&lt;p&gt;Good job in completing the basic tutorials. Now can check out the more complicated
tutorials&lt;/p&gt;
&lt;h3 id="snake-game"&gt;Snake Game&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3 id="my-name-is"&gt;My Name Is&lt;/h3&gt;
&lt;p&gt;This example display you name. Use this to make a simple name badge
&lt;/p&gt;
&lt;p&gt;Configure your name and use the awesome TinyGo-powered badge!&lt;/p&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;p&gt;Find the different type of fonts you can use
&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Official repository:
&lt;/p&gt;</description></item></channel></rss>