<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.extremist.software/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=158.51.83.162</id>
	<title>Noisebridge - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.extremist.software/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=158.51.83.162"/>
	<link rel="alternate" type="text/html" href="https://wiki.extremist.software/wiki/Special:Contributions/158.51.83.162"/>
	<updated>2026-04-05T18:09:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Circuit_Python_at_Noisebridge&amp;diff=81713</id>
		<title>Circuit Python at Noisebridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Circuit_Python_at_Noisebridge&amp;diff=81713"/>
		<updated>2023-08-29T01:15:05Z</updated>

		<summary type="html">&lt;p&gt;158.51.83.162: /* Getting Started with Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Circuit Python at Noisebridge==&lt;br /&gt;
&lt;br /&gt;
Welcome to this page, which will get you started  with Circuit Python. You can do this any time, or with a group at [[Circuit Hacking Monday]]&lt;br /&gt;
&lt;br /&gt;
Some links to get started:&lt;br /&gt;
&lt;br /&gt;
* If you are new to Circuit Python, start here! https://learn.adafruit.com/welcome-to-circuitpython/&lt;br /&gt;
* We are using the &#039;&#039;&#039;[https://www.wemos.cc/en/latest/s2/s2_mini.html Lolin S2 Mini]&#039;&#039;&#039; board. Here&#039;s  some information: https://circuitpython.org/board/lolin_s2_mini/&lt;br /&gt;
&lt;br /&gt;
==Getting Started with Programming==&lt;br /&gt;
&lt;br /&gt;
Your board will automatically run the code found in the file &#039;&#039;&#039;code.py.&#039;&#039;&#039; Change the contents of that file to run different code.&lt;br /&gt;
To get libraries, go here: https://circuitpython.org/libraries. remember to put the libraries you need in the &#039;&#039;&#039;/lib&#039;&#039;&#039; directory.  &lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;hello world&amp;quot; code found in &#039;&#039;&#039;[https://codeberg.org/headrotor/circuitpython-examples/src/branch/main/lolinS2mini/code.py code.py].&#039;&#039;&#039;  This will blink the LED and write text to the serial output for debugging. &lt;br /&gt;
* Try something simple. Can you make the onboard LED (&amp;lt;tt&amp;gt;board.LED&amp;lt;/tt&amp;gt;) blink from the button (&amp;lt;tt&amp;gt;board.BUTTON&amp;lt;/tt&amp;gt;)? https://learn.adafruit.com/circuitpython-essentials/circuitpython-digital-in-out&lt;br /&gt;
* Can you change the brightness of the LED using PWM? https://learn.adafruit.com/circuitpython-essentials/circuitpython-pwm&lt;br /&gt;
* Try something more complicated, like controlling Neopixel addressable LEDs: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel&lt;br /&gt;
* Your board can look like a USB HID device, so you can make it into a keyboard! https://learn.adafruit.com/make-it-a-keyboard/circuitpython&lt;br /&gt;
* Your board is Wi-Fi and Bluetooth capable! Try running a webserver: https://docs.circuitpython.org/projects/httpserver/en/latest/index.html&lt;br /&gt;
* Your board can send alerts to your phone using &#039;&#039;&#039;[https://docs.ntfy.sh/ ntfy.sh]&#039;&#039;&#039;. Here&#039;s how: https://www.tomshardware.com/how-to/send-alerts-raspberry-pi-pico-w-to-mobile-device&lt;br /&gt;
&lt;br /&gt;
Having problems? Working examples of code for several suggestions can be found here: https://codeberg.org/headrotor/circuitpython-examples&lt;br /&gt;
&lt;br /&gt;
==Hooking up Hardware==&lt;br /&gt;
&lt;br /&gt;
We have soldering equipment so you can install the headers that came with your board. A good tip is to put the headers into a solderless breadboard before soldering so they are straight and even. Only install the outside headers (odd pins) if you want to use this in a solderless breadboard otherwise they will short! We have lots of hardware to play with including sensors and Neopixel LEDs; you will need the Adafruit library: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
&lt;br /&gt;
Note the button needs a pullup so be sure to set  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch = DigitalInOut(board.button)&lt;br /&gt;
switch.direction = Direction.INPUT&lt;br /&gt;
switch.pull = Pull.UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the names of the pins available, enter the REPL (using Mu or a terminal program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import board&lt;br /&gt;
dir(board)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the LED library, pin 1 = &amp;lt;tt&amp;gt;IO1&amp;lt;/tt&amp;gt; and so forth... If you have installed only the outside headers, use pin &amp;lt;tt&amp;gt;IO3&amp;lt;/tt&amp;gt; (or odd numbered pins) so that there&#039;s something to connect to. &lt;br /&gt;
* It is possible that the silkscreen labels for pins 12 and 13 have been swapped. Test to make sure!&lt;br /&gt;
* Todbot has some fun code to play with, like synthesizers! https://gist.github.com/todbot/&lt;br /&gt;
&lt;br /&gt;
== Lolin S2 Mini pinout ==&lt;br /&gt;
&lt;br /&gt;
Here is a mapping of Python pin names to the board pins (labeled in white on the bottom of the board). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Lolin D2 Mini Pinout &lt;br /&gt;
|-&lt;br /&gt;
! Python Name !! Alternate Name !! Pin Number &lt;br /&gt;
|-&lt;br /&gt;
| board.IO0 || board.BUTTON  || (button)&lt;br /&gt;
|-&lt;br /&gt;
| board.IO1 || || 1&lt;br /&gt;
|-&lt;br /&gt;
| board.IO2 || || 2&lt;br /&gt;
|-&lt;br /&gt;
| board.IO3 || || 3&lt;br /&gt;
|-&lt;br /&gt;
| board.IO4 || || 4&lt;br /&gt;
|-&lt;br /&gt;
| board.IO5 || || 5&lt;br /&gt;
|-&lt;br /&gt;
| board.IO6 || || 6&lt;br /&gt;
|-&lt;br /&gt;
| board.IO7 || board.SCK || 7&lt;br /&gt;
|-&lt;br /&gt;
| board.IO8 || || 8&lt;br /&gt;
|-&lt;br /&gt;
| board.IO9 || board.MISO || 9&lt;br /&gt;
|-&lt;br /&gt;
| board.IO10 || || 10&lt;br /&gt;
|-&lt;br /&gt;
| board.IO11 || board.MOSI || 11&lt;br /&gt;
|-&lt;br /&gt;
| board.IO12 || || 12&lt;br /&gt;
|-&lt;br /&gt;
| board.IO13 || || 13&lt;br /&gt;
|-&lt;br /&gt;
| board.IO14 || || 14&lt;br /&gt;
|-&lt;br /&gt;
| board.IO15 || board.LED || (LED)&lt;br /&gt;
|-&lt;br /&gt;
| board.IO16 || || 16&lt;br /&gt;
|-&lt;br /&gt;
| board.IO17 || || 17&lt;br /&gt;
|-&lt;br /&gt;
| board.IO18 || || 18&lt;br /&gt;
|-&lt;br /&gt;
| board.IO21 || || 21&lt;br /&gt;
|-&lt;br /&gt;
| board.IO33 || board.SDA || 33&lt;br /&gt;
|-&lt;br /&gt;
| board.IO34 || || 34&lt;br /&gt;
|-&lt;br /&gt;
| board.IO35 || board.SCL || 35&lt;br /&gt;
|-&lt;br /&gt;
| board.IO36 || || 36&lt;br /&gt;
|-&lt;br /&gt;
| board.IO37 || || 37&lt;br /&gt;
|-&lt;br /&gt;
| board.IO38 || || 38&lt;br /&gt;
|-&lt;br /&gt;
| board.IO39 || || 39&lt;br /&gt;
|-&lt;br /&gt;
| board.IO40 || || 40&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some alternate pin names are available, these don&#039;t correspond to anything on the board so no need to use them. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
board.A0 board.IO3&lt;br /&gt;
board.D0 board.IO5&lt;br /&gt;
board.D1 board.IO35 &lt;br /&gt;
board.D2 board.IO33 &lt;br /&gt;
board.D3 board.IO18&lt;br /&gt;
board.D4 board.IO16&lt;br /&gt;
board.D5 board.IO7 &lt;br /&gt;
board.D6 board.IO9 &lt;br /&gt;
board.D7 board.IO11 &lt;br /&gt;
board.D8 board.IO13&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing Circuit Python on Lolin S2 Mini boards==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;We have already done this for you! But you might need to do it again, or if you get your own boards, this is how we do it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Download the latest Circuit Python binary from here: https://circuitpython.org/board/lolin_s2_mini/&lt;br /&gt;
# Put the Lolin S2 board into tty mode: while holding down the &amp;quot;&amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;&amp;quot; button, press and release the &amp;quot;&amp;lt;tt&amp;gt;RESET&amp;lt;/tt&amp;gt;&amp;quot; button. Make sure there&#039;s a tty (com port) available.&lt;br /&gt;
# Install &amp;lt;tt&amp;gt;esptool.py&amp;lt;/tt&amp;gt; frop PIP: &amp;lt;tt&amp;gt; python -m pip install esptool &amp;lt;/tt&amp;gt;&lt;br /&gt;
# At the command line, enter &amp;lt;pre&amp;gt; esptool.py -p /dev/ttyACM0 --chip esp32s2 --baud 1000000 write_flash -z 0x0 adafruit-circuitpython-lolin_s2_mini-en_US-8.0.0-beta.6.bin&amp;lt;/pre&amp;gt;  (use the right serial port if not ttyACM0, also use filename of the binary you just downloaded: it will be more recent than 8.0.0)&lt;br /&gt;
# (if this doesn&#039;t work at first, try erasing flash with &amp;lt;tt&amp;gt;esptool.py --port PORT_NAME erase_flash&amp;lt;/tt&amp;gt;, and/or repeat until it enumerates as &amp;lt;tt&amp;gt;/dev/ttyACM1&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# You can also do the previous 2 steps using https://adafruit.github.io/Adafruit_WebSerial_ESPTool/ or  https://espressif.github.io/esptool-js/ but only on Chrome browsers. This can fix problems if esptool is not working.&lt;br /&gt;
# Reconnect your S2 Mini board, you should see a removable drive appear labeled &amp;lt;tt&amp;gt;CIRCUITPY&amp;lt;/tt&amp;gt;&lt;br /&gt;
# You are now able to edit &amp;lt;tt&amp;gt;code.py&amp;lt;/tt&amp;gt;, add libraries to &amp;lt;tt&amp;gt;/lib&amp;lt;/tt&amp;gt;, and connect to the serial port (usually &amp;lt;tt&amp;gt;/dev/ttyACM0&amp;lt;/tt&amp;gt; on Mac/Linux or &amp;lt;tt&amp;gt;COM3&amp;lt;/tt&amp;gt; on Windows&lt;/div&gt;</summary>
		<author><name>158.51.83.162</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Circuit_Python_at_Noisebridge&amp;diff=81709</id>
		<title>Circuit Python at Noisebridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Circuit_Python_at_Noisebridge&amp;diff=81709"/>
		<updated>2023-08-28T19:15:48Z</updated>

		<summary type="html">&lt;p&gt;158.51.83.162: Added link to code examples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Circuit Python at Noisebridge==&lt;br /&gt;
&lt;br /&gt;
Welcome to this page, which will get you started  with Circuit Python. You can do this any time, or with a group at [[Circuit Hacking Monday]]&lt;br /&gt;
&lt;br /&gt;
Some links to get started:&lt;br /&gt;
&lt;br /&gt;
* If you are new to Circuit Python, start here! https://learn.adafruit.com/welcome-to-circuitpython/&lt;br /&gt;
* We are using the &#039;&#039;&#039;[https://www.wemos.cc/en/latest/s2/s2_mini.html Lolin S2 Mini]&#039;&#039;&#039; board. Here&#039;s  some information: https://circuitpython.org/board/lolin_s2_mini/&lt;br /&gt;
&lt;br /&gt;
==Getting Started with Programming==&lt;br /&gt;
&lt;br /&gt;
Your board will automatically run the code found in the file &#039;&#039;&#039;code.py.&#039;&#039;&#039; Change the contents of that file to run different code. &lt;br /&gt;
&lt;br /&gt;
* Run the &amp;quot;hello world&amp;quot; code found in &#039;&#039;&#039;[https://codeberg.org/headrotor/circuitpython-examples/src/branch/main/lolinS2mini/code.py code.py].&#039;&#039;&#039;  This will blink the LED and write text to the serial output for debugging. &lt;br /&gt;
* Try something simple. Can you make the onboard LED (&amp;lt;tt&amp;gt;board.LED&amp;lt;/tt&amp;gt;) blink from the button (&amp;lt;tt&amp;gt;board.BUTTON&amp;lt;/tt&amp;gt;)? https://learn.adafruit.com/circuitpython-essentials/circuitpython-digital-in-out&lt;br /&gt;
* Can you change the brightness of the LED using PWM? https://learn.adafruit.com/circuitpython-essentials/circuitpython-pwm&lt;br /&gt;
* Try something more complicated, like controlling Neopixel addressable LEDs: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel&lt;br /&gt;
* Your board can look like a USB HID device, so you can make it into a keyboard! https://learn.adafruit.com/make-it-a-keyboard/circuitpython&lt;br /&gt;
* Your board is Wi-Fi and Bluetooth capable! Try running a webserver, or connecting to your phone! &lt;br /&gt;
&lt;br /&gt;
Having problems? Working examples of code for the first three suggestions can be found here: https://codeberg.org/headrotor/circuitpython-examples&lt;br /&gt;
&lt;br /&gt;
==Hooking up Hardware==&lt;br /&gt;
&lt;br /&gt;
We have soldering equipment so you can install the headers that came with your board. A good tip is to put the headers into a solderless breadboard before soldering so they are straight and even. Only install the outside headers (odd pins) if you want to use this in a solderless breadboard otherwise they will short! We have lots of hardware to play with including sensors and Neopixel LEDs; you will need the Adafruit library: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
&lt;br /&gt;
Note the button needs a pullup so be sure to set  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch = DigitalInOut(board.button)&lt;br /&gt;
switch.direction = Direction.INPUT&lt;br /&gt;
switch.pull = Pull.UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the names of the pins available, enter the REPL (using Mu or a terminal program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import board&lt;br /&gt;
dir(board)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the LED library, pin 1 = &amp;lt;tt&amp;gt;IO1&amp;lt;/tt&amp;gt; and so forth... If you have installed only the outside headers, use pin &amp;lt;tt&amp;gt;IO3&amp;lt;/tt&amp;gt; (or odd numbered pins) so that there&#039;s something to connect to. &lt;br /&gt;
* It is possible that the silkscreen labels for pins 12 and 13 have been swapped. Test to make sure!&lt;br /&gt;
* Todbot has some fun code to play with, like synthesizers! https://gist.github.com/todbot/&lt;br /&gt;
&lt;br /&gt;
== Lolin S2 Mini pinout ==&lt;br /&gt;
&lt;br /&gt;
Here is a mapping of Python pin names to the board pins (labeled in white on the bottom of the board). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Lolin D2 Mini Pinout &lt;br /&gt;
|-&lt;br /&gt;
! Python Name !! Alternate Name !! Pin Number &lt;br /&gt;
|-&lt;br /&gt;
| board.IO0 || board.BUTTON  || (button)&lt;br /&gt;
|-&lt;br /&gt;
| board.IO1 || || 1&lt;br /&gt;
|-&lt;br /&gt;
| board.IO2 || || 2&lt;br /&gt;
|-&lt;br /&gt;
| board.IO3 || || 3&lt;br /&gt;
|-&lt;br /&gt;
| board.IO4 || || 4&lt;br /&gt;
|-&lt;br /&gt;
| board.IO5 || || 5&lt;br /&gt;
|-&lt;br /&gt;
| board.IO6 || || 6&lt;br /&gt;
|-&lt;br /&gt;
| board.IO7 || board.SCK || 7&lt;br /&gt;
|-&lt;br /&gt;
| board.IO8 || || 8&lt;br /&gt;
|-&lt;br /&gt;
| board.IO9 || board.MISO || 9&lt;br /&gt;
|-&lt;br /&gt;
| board.IO10 || || 10&lt;br /&gt;
|-&lt;br /&gt;
| board.IO11 || board.MOSI || 11&lt;br /&gt;
|-&lt;br /&gt;
| board.IO12 || || 12&lt;br /&gt;
|-&lt;br /&gt;
| board.IO13 || || 13&lt;br /&gt;
|-&lt;br /&gt;
| board.IO14 || || 14&lt;br /&gt;
|-&lt;br /&gt;
| board.IO15 || board.LED || (LED)&lt;br /&gt;
|-&lt;br /&gt;
| board.IO16 || || 16&lt;br /&gt;
|-&lt;br /&gt;
| board.IO17 || || 17&lt;br /&gt;
|-&lt;br /&gt;
| board.IO18 || || 18&lt;br /&gt;
|-&lt;br /&gt;
| board.IO21 || || 21&lt;br /&gt;
|-&lt;br /&gt;
| board.IO33 || board.SDA || 33&lt;br /&gt;
|-&lt;br /&gt;
| board.IO34 || || 34&lt;br /&gt;
|-&lt;br /&gt;
| board.IO35 || board.SCL || 35&lt;br /&gt;
|-&lt;br /&gt;
| board.IO36 || || 36&lt;br /&gt;
|-&lt;br /&gt;
| board.IO37 || || 37&lt;br /&gt;
|-&lt;br /&gt;
| board.IO38 || || 38&lt;br /&gt;
|-&lt;br /&gt;
| board.IO39 || || 39&lt;br /&gt;
|-&lt;br /&gt;
| board.IO40 || || 40&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some alternate pin names are available, these don&#039;t correspond to anything on the board so no need to use them. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
board.A0 board.IO3&lt;br /&gt;
board.D0 board.IO5&lt;br /&gt;
board.D1 board.IO35 &lt;br /&gt;
board.D2 board.IO33 &lt;br /&gt;
board.D3 board.IO18&lt;br /&gt;
board.D4 board.IO16&lt;br /&gt;
board.D5 board.IO7 &lt;br /&gt;
board.D6 board.IO9 &lt;br /&gt;
board.D7 board.IO11 &lt;br /&gt;
board.D8 board.IO13&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing Circuit Python on Lolin S2 Mini boards==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;We have already done this for you! But you might need to do it again, or if you get your own boards, this is how we do it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Download the latest Circuit Python binary from here: https://circuitpython.org/board/lolin_s2_mini/&lt;br /&gt;
# Put the Lolin S2 board into tty mode: while holding down the &amp;quot;&amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;&amp;quot; button, press and release the &amp;quot;&amp;lt;tt&amp;gt;RESET&amp;lt;/tt&amp;gt;&amp;quot; button. Make sure there&#039;s a tty (com port) available.&lt;br /&gt;
# Install &amp;lt;tt&amp;gt;esptool.py&amp;lt;/tt&amp;gt; frop PIP: &amp;lt;tt&amp;gt; python -m pip install esptool &amp;lt;/tt&amp;gt;&lt;br /&gt;
# At the command line, enter &amp;lt;pre&amp;gt; esptool.py -p /dev/ttyACM0 --chip esp32s2 --baud 1000000 write_flash -z 0x0 adafruit-circuitpython-lolin_s2_mini-en_US-8.0.0-beta.6.bin&amp;lt;/pre&amp;gt;  (use the right serial port if not ttyACM0, also use filename of the binary you just downloaded: it will be more recent than 8.0.0)&lt;br /&gt;
# (if this doesn&#039;t work at first, try erasing flash with &amp;lt;tt&amp;gt;esptool.py --port PORT_NAME erase_flash&amp;lt;/tt&amp;gt;, and/or repeat until it enumerates as &amp;lt;tt&amp;gt;/dev/ttyACM1&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# You can also do the previous 2 steps using https://adafruit.github.io/Adafruit_WebSerial_ESPTool/ or  https://espressif.github.io/esptool-js/ but only on Chrome browsers. This can fix problems if esptool is not working.&lt;br /&gt;
# Reconnect your S2 Mini board, you should see a removable drive appear labeled &amp;lt;tt&amp;gt;CIRCUITPY&amp;lt;/tt&amp;gt;&lt;br /&gt;
# You are now able to edit &amp;lt;tt&amp;gt;code.py&amp;lt;/tt&amp;gt;, add libraries to &amp;lt;tt&amp;gt;/lib&amp;lt;/tt&amp;gt;, and connect to the serial port (usually &amp;lt;tt&amp;gt;/dev/ttyACM0&amp;lt;/tt&amp;gt; on Mac/Linux or &amp;lt;tt&amp;gt;COM3&amp;lt;/tt&amp;gt; on Windows&lt;/div&gt;</summary>
		<author><name>158.51.83.162</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Circuit_Python_at_Noisebridge&amp;diff=81708</id>
		<title>Circuit Python at Noisebridge</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Circuit_Python_at_Noisebridge&amp;diff=81708"/>
		<updated>2023-08-28T17:12:10Z</updated>

		<summary type="html">&lt;p&gt;158.51.83.162: /* Hooking up Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Circuit Python at Noisebridge==&lt;br /&gt;
&lt;br /&gt;
Welcome to this page, which will get you started  with Circuit Python. You can do this any time, or with a group at [[Circuit Hacking Monday]]&lt;br /&gt;
&lt;br /&gt;
Some links to get started:&lt;br /&gt;
&lt;br /&gt;
* If you are new to Circuit Python, start here! https://learn.adafruit.com/welcome-to-circuitpython/&lt;br /&gt;
* We are using the &#039;&#039;&#039;[https://www.wemos.cc/en/latest/s2/s2_mini.html Lolin S2 Mini]&#039;&#039;&#039; board. Here&#039;s  some information: https://circuitpython.org/board/lolin_s2_mini/&lt;br /&gt;
&lt;br /&gt;
==Getting Started with Programming==&lt;br /&gt;
&lt;br /&gt;
* Try something simple. Can you make the onboard LED (&amp;lt;tt&amp;gt;board.LED&amp;lt;/tt&amp;gt;) blink from the button (&amp;lt;tt&amp;gt;board.BUTTON&amp;lt;/tt&amp;gt;)? https://learn.adafruit.com/circuitpython-essentials/circuitpython-digital-in-out&lt;br /&gt;
* Can you change the brightness of the LED using PWM? https://learn.adafruit.com/circuitpython-essentials/circuitpython-pwm&lt;br /&gt;
* Try something more complicated, like controlling Neopixel addressable LEDs: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel&lt;br /&gt;
* Your board can look like a USB HID device, so you can make it into a keyboard! https://learn.adafruit.com/make-it-a-keyboard/circuitpython&lt;br /&gt;
* Your board is Wi-Fi and Bluetooth capable! Try running a webserver, or connecting to your phone! &lt;br /&gt;
&lt;br /&gt;
==Hooking up Hardware==&lt;br /&gt;
&lt;br /&gt;
We have soldering equipment so you can install the headers that came with your board. A good tip is to put the headers into a solderless breadboard before soldering so they are straight and even. Only install the outside headers (odd pins) if you want to use this in a solderless breadboard otherwise they will short! We have lots of hardware to play with including sensors and Neopixel LEDs; you will need the Adafruit library: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel&lt;br /&gt;
&lt;br /&gt;
==Tips and Tricks==&lt;br /&gt;
&lt;br /&gt;
Note the button needs a pullup so be sure to set  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
switch = DigitalInOut(board.button)&lt;br /&gt;
switch.direction = Direction.INPUT&lt;br /&gt;
switch.pull = Pull.UP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the names of the pins available, enter the REPL (using Mu or a terminal program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import board&lt;br /&gt;
dir(board)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* For the LED library, pin 1 = &amp;lt;tt&amp;gt;IO1&amp;lt;/tt&amp;gt; and so forth... If you have installed only the outside headers, use pin &amp;lt;tt&amp;gt;IO3&amp;lt;/tt&amp;gt; (or odd numbered pins) so that there&#039;s something to connect to. &lt;br /&gt;
* It is possible that the silkscreen labels for pins 12 and 13 have been swapped. Test to make sure!&lt;br /&gt;
* Todbot has some fun code to play with, like synthesizers! https://gist.github.com/todbot/&lt;br /&gt;
&lt;br /&gt;
== Lolin S2 Mini pinout ==&lt;br /&gt;
&lt;br /&gt;
Here is a mapping of Python pin names to the board pins (labeled in white on the bottom of the board). &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;margin:auto&amp;quot;&lt;br /&gt;
|+ Lolin D2 Mini Pinout &lt;br /&gt;
|-&lt;br /&gt;
! Python Name !! Alternate Name !! Pin Number &lt;br /&gt;
|-&lt;br /&gt;
| board.IO0 || board.BUTTON  || (button)&lt;br /&gt;
|-&lt;br /&gt;
| board.IO1 || || 1&lt;br /&gt;
|-&lt;br /&gt;
| board.IO2 || || 2&lt;br /&gt;
|-&lt;br /&gt;
| board.IO3 || || 3&lt;br /&gt;
|-&lt;br /&gt;
| board.IO4 || || 4&lt;br /&gt;
|-&lt;br /&gt;
| board.IO5 || || 5&lt;br /&gt;
|-&lt;br /&gt;
| board.IO6 || || 6&lt;br /&gt;
|-&lt;br /&gt;
| board.IO7 || board.SCK || 7&lt;br /&gt;
|-&lt;br /&gt;
| board.IO8 || || 8&lt;br /&gt;
|-&lt;br /&gt;
| board.IO9 || board.MISO || 9&lt;br /&gt;
|-&lt;br /&gt;
| board.IO10 || || 10&lt;br /&gt;
|-&lt;br /&gt;
| board.IO11 || board.MOSI || 11&lt;br /&gt;
|-&lt;br /&gt;
| board.IO12 || || 12&lt;br /&gt;
|-&lt;br /&gt;
| board.IO13 || || 13&lt;br /&gt;
|-&lt;br /&gt;
| board.IO14 || || 14&lt;br /&gt;
|-&lt;br /&gt;
| board.IO15 || board.LED || (LED)&lt;br /&gt;
|-&lt;br /&gt;
| board.IO16 || || 16&lt;br /&gt;
|-&lt;br /&gt;
| board.IO17 || || 17&lt;br /&gt;
|-&lt;br /&gt;
| board.IO18 || || 18&lt;br /&gt;
|-&lt;br /&gt;
| board.IO21 || || 21&lt;br /&gt;
|-&lt;br /&gt;
| board.IO33 || board.SDA || 33&lt;br /&gt;
|-&lt;br /&gt;
| board.IO34 || || 34&lt;br /&gt;
|-&lt;br /&gt;
| board.IO35 || board.SCL || 35&lt;br /&gt;
|-&lt;br /&gt;
| board.IO36 || || 36&lt;br /&gt;
|-&lt;br /&gt;
| board.IO37 || || 37&lt;br /&gt;
|-&lt;br /&gt;
| board.IO38 || || 38&lt;br /&gt;
|-&lt;br /&gt;
| board.IO39 || || 39&lt;br /&gt;
|-&lt;br /&gt;
| board.IO40 || || 40&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Some alternate pin names are available, these don&#039;t correspond to anything on the board so no need to use them. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
board.A0 board.IO3&lt;br /&gt;
board.D0 board.IO5&lt;br /&gt;
board.D1 board.IO35 &lt;br /&gt;
board.D2 board.IO33 &lt;br /&gt;
board.D3 board.IO18&lt;br /&gt;
board.D4 board.IO16&lt;br /&gt;
board.D5 board.IO7 &lt;br /&gt;
board.D6 board.IO9 &lt;br /&gt;
board.D7 board.IO11 &lt;br /&gt;
board.D8 board.IO13&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Installing Circuit Python on Lolin S2 Mini boards==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;We have already done this for you! But you might need to do it again, or if you get your own boards, this is how we do it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Download the latest Circuit Python binary from here: https://circuitpython.org/board/lolin_s2_mini/&lt;br /&gt;
# Put the Lolin S2 board into tty mode: while holding down the &amp;quot;&amp;lt;tt&amp;gt;0&amp;lt;/tt&amp;gt;&amp;quot; button, press and release the &amp;quot;&amp;lt;tt&amp;gt;RESET&amp;lt;/tt&amp;gt;&amp;quot; button. Make sure there&#039;s a tty (com port) available.&lt;br /&gt;
# Install &amp;lt;tt&amp;gt;esptool.py&amp;lt;/tt&amp;gt; frop PIP: &amp;lt;tt&amp;gt; python -m pip install esptool &amp;lt;/tt&amp;gt;&lt;br /&gt;
# At the command line, enter &amp;lt;pre&amp;gt; esptool.py -p /dev/ttyACM0 --chip esp32s2 --baud 1000000 write_flash -z 0x0 adafruit-circuitpython-lolin_s2_mini-en_US-8.0.0-beta.6.bin&amp;lt;/pre&amp;gt;  (use the right serial port if not ttyACM0, also use filename of the binary you just downloaded: it will be more recent than 8.0.0)&lt;br /&gt;
# (if this doesn&#039;t work at first, try erasing flash with &amp;lt;tt&amp;gt;esptool.py --port PORT_NAME erase_flash&amp;lt;/tt&amp;gt;, and/or repeat until it enumerates as &amp;lt;tt&amp;gt;/dev/ttyACM1&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# You can also do the previous 2 steps using https://adafruit.github.io/Adafruit_WebSerial_ESPTool/ or  https://espressif.github.io/esptool-js/ but only on Chrome browsers. This can fix problems if esptool is not working.&lt;br /&gt;
# Reconnect your S2 Mini board, you should see a removable drive appear labeled &amp;lt;tt&amp;gt;CIRCUITPY&amp;lt;/tt&amp;gt;&lt;br /&gt;
# You are now able to edit &amp;lt;tt&amp;gt;code.py&amp;lt;/tt&amp;gt;, add libraries to &amp;lt;tt&amp;gt;/lib&amp;lt;/tt&amp;gt;, and connect to the serial port (usually &amp;lt;tt&amp;gt;/dev/ttyACM0&amp;lt;/tt&amp;gt; on Mac/Linux or &amp;lt;tt&amp;gt;COM3&amp;lt;/tt&amp;gt; on Windows&lt;/div&gt;</summary>
		<author><name>158.51.83.162</name></author>
	</entry>
</feed>