Skip to content
Permalink
Browse files

Initial import

  • Loading branch information...
arturo182 committed Sep 4, 2019
1 parent 8b7e7e0 commit 3f87dc53b9b88dfe2255f84cabdd5283a9f9f924
@@ -0,0 +1 @@
resources
@@ -1,3 +1,3 @@
[submodule "themes/book"]
path = themes/book
url = https://github.com/alex-shpak/hugo-book
url = https://github.com/arturo182/hugo-book
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

@@ -0,0 +1 @@
@import "variables";
@@ -0,0 +1,24 @@
baseURL = "https://serpente.solder.party/"
languageCode = "en-us"
title = 'Serpente Docs'
theme = 'book'
disableKinds = ['taxonomy', 'taxonomyTerm']

disablePathToLower = true
enableGitInfo = true

# pygmentsStyle = 'monokailight'
pygmentsCodeFences = true

[params]
BookToC = 3
BookMenuBundle = '/menu'
BookSection = 'docs'
BookRepo = 'https://github.com/arturo182/serpente_www'
BookEditPath = 'edit/master/content'
BookDateFormat = 'Jan 2, 2006'
BookSearch = true

[params.footer]
copyright = "[arturo182](https://twitter.com/arturo182)"
show_powered_by = true
@@ -0,0 +1,28 @@
---
title: Introduction
type: docs
---

# Introduction

The Serpente boards are low-cost development boards designed to be used with Adafruit's CircuitPython. For more information and learning material regarding CircuitPython, please follow the [Welcome to CircuitPython!](https://learn.adafruit.com/welcome-to-circuitpython/overview) article from Adafruit.

They are both virtually the same, except for the USB connector. The standard Serpente board contains a USB Type-C connector, and the Serpente Plug uses the board itself as a Type-A USB plug.

If you are familiar with the Digispark boards, you may notice some similarities. This fact is of course not incidental, the Serpente boards are inspired by the Digispark, both in form-factor as well as use-cases. The Serpente boards are meant to be used as quick and dirty, yet flexible, prototyping tools.

## Technical details

Here are some of the technical details regarding the boards:

- ATSAMD21E18A 32-bit Cortex-M0+ running at 48MHz
- 256KB flash and 32KB RAM
- 4MB Flash for storing files and CircuitPython code
- 6 highly customizable GPIOs
- 250mA LDO
- 3.3V logic and power
- Powered either from USB or external source
- User-controlled RGB LED
- Mounting holes on the Serpente Type-C board

[![Both Boards](/both_boards_small.jpg)](/both_boards.jpg)
@@ -0,0 +1,25 @@
---
title: Downloads
type: docs
---

# Downloads

## Datasheets
- [ATSAMD21 Cortex-M0+ Microcontroller](http://ww1.microchip.com/downloads/en/devicedoc/40001884a.pdf)
- [GD25Q32C 4MB Serial Flash](http://www.gigadevice.com/datasheet/gd25q32c/)
- [SC662K-3.3V LDO](https://datasheet.lcsc.com/szlcsc/Shenzhen-Fuman-Elec-SC662K-3-3V_C83932.pdf)
- [FM-B2020RGBA-HG RGB LED](https://datasheet.lcsc.com/szlcsc/Foshan-NationStar-Optoelectronics-FM-B2020RGBA-HG_C108793.pdf)

## Firmware
The Serpente boards come with [UF2 Bootloader](https://github.com/microsoft/uf2-samdx1) and [CircuitPython](https://github.com/adafruit/circuitpython) pre-installed.

## Schematics

### Serpente Type-C

[![Schematic](/schematics_serpente.png)](/schematics_serpente.png)

### Serpente Plug

[![Schematic Plug](/schematics_plug.png)](/schematics_plug.png)
@@ -0,0 +1,47 @@
---
title: GPIO Configurations
type: docs
---

# GPIO Configurations

Thanks to the flexibility of the SAMD21 SERCOM peripheral, the Serpente boards give you access to multiple serial interfaces with just 6 GPIOs. See [Pinout]({{< relref "/docs/pinout.md" >}}) for an overview of the pins.

Note that most of the interfaces are easily accessible using CircuitPython, altough some of them can't be used at the same time:
{{< highlight python >}}
import board, busio

spi = board.SPI()
i2c = board.I2C()
uart = board.UART()
uart2 = busio.UART(board.TX2, board.RX2)
{{< / highlight >}}

Here's a list of some of the ways you can configure the GPIOs on your Serpente:

## SPI + 3 GPIOs
<img src="/config-spi.png" style="width: 500px">

## I2C + 4 GPIOs
<img src="/config-i2c.png" style="width: 500px">

## UART + 4 GPIOs
<img src="/config-uart.png" style="width: 500px"><br>
or<br>
<img src="/config-uart2.png" style="width: 500px"><br>

## 2x UART + 2 GPIOs
<img src="/config-2xuart.png" style="width: 500px"><br>
**Note: Because of a quirk on CircuitPython's implementation, you need to initialize UART 2 before UART.**

## SPI + I2C + 1 GPIO
<img src="/config-spi-i2c.png" style="width: 500px">

## SPI + UART + 1 GPIO
<img src="/config-spi-uart.png" style="width: 500px">

## UART + I2C + 2 GPIOs
<img src="/config-uart-i2c.png" style="width: 500px">

## 6 GPIOs
See [Pinout]({{< relref "/docs/pinout.md" >}}).
@@ -0,0 +1,24 @@
---
title: Guided Tour
type: docs
---

# Guided Tour

Let's have a quick look at the boards and what's on them. Both boards have the same components except the USB connectors.

{{< columns >}}
[![Serpente Plug](/tour_plug_small.jpg)](/tour_plug.jpg)
<--->
[![Serpente Type-C](/tour_type_c_small.jpg)](/tour_type_c.jpg)
{{< /columns >}}

- **USB A / USB Type-C Connector** - Two options to choose from, use the one that works best for you! USB is used for both data and power. The Type-C connector supports only USB 2.0 signals and is hardwired to be a Sink only.
- **Reset Button** - Allows you to reset the board quickly and if you double press it, the board boots into the bootloader.
- **4MB Flash Storage** - All 4MB of the storage are available to you, you can store your CircuitPython files as well as logs, images and more! When connected to a PC, the flash storage shows up as a disk drive.
- **ATSAMD21 Microcontroller** - Cortex-M0+ running at 48MHz, not the fastest thing around, but fast enough for prototyping and simple applications.
- **6 Flexible GPIOs** - All 6 GPIOs can be used as analog inputs, PWM outputs or regular digital IOs. You can also configure them to be SPI, I2C and/or UART. See [Pinout]({{< relref "/docs/pinout.md" >}}) and [GPIO Configurations]({{< relref "/docs/gpios.md" >}}) for more details.
- **3.3V LDO** - The LDO provides up to 250mA of current for you.
- **RGB LED** - Each color is user-controllable with a possibility to PWM the colors.
- **Optional External Power** - If you don't want to use the USB to power the board, connect an external source (max 6V) to the `VIN` pin and you're ready to go!
- **Mount holes** (Type-C only) - We used the extra space to provide you with two mounting holes in case you want to make sure your Serpente stays in place.
@@ -0,0 +1,10 @@
---
title: Pinout
type: docs
---

# Pinout

[![Pinout](/pinout_small.png)](/pinout.png)

Click for a (lot) larger version.
@@ -0,0 +1,195 @@
# Shortcodes

## Expand shortcode

### Default

```tpl
{{</* expand */>}}
## Markdown content
Lorem markdownum insigne...
{{</* /expand */>}}
```

{{< expand >}}
## Markdown content
Lorem markdownum insigne...
{{< /expand >}}

### With Custom Label

```tpl
{{</* expand "Custom Label" "..." */>}}
## Markdown content
Lorem markdownum insigne...
{{</* /expand */>}}
```

{{< expand "Custom Label" "..." >}}
## Markdown content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{< /expand >}}

## Buttons

```tpl
{{</* button relref="/" [class="..."] */>}}Get Home{{</* /button */>}}
{{</* button href="https://github.com/alex-shpak/hugo-book" */>}}Contribute{{</* /button */>}}
```

{{< button relref="/" >}}Get Home{{< /button >}}
{{< button href="https://github.com/alex-shpak/hugo-book" >}}Contribute{{< /button >}}

## Tabs

```tpl
{{</* tabs "uniqueid" */>}}
{{</* tab "MacOS" */>}} # MacOS Content {{</* /tab */>}}
{{</* tab "Linux" */>}} # Linux Content {{</* /tab */>}}
{{</* tab "Windows" */>}} # Windows Content {{</* /tab */>}}
{{</* /tabs */>}}
```

{{< tabs "uniqueid" >}}
{{< tab "MacOS" >}}
# MacOS

This is tab **MacOS** content.

Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{< /tab >}}

{{< tab "Linux" >}}

# Linux

This is tab **Linux** content.

Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{< /tab >}}

{{< tab "Windows" >}}

# Windows

This is tab **Windows** content.

Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{< /tab >}}
{{< /tabs >}}

## Columns

```html
{{</* columns */>}} <!-- begin columns block -->
# Left Content
Lorem markdownum insigne...

<---> <!-- magic sparator, between columns -->

# Mid Content
Lorem markdownum insigne...

<---> <!-- magic sparator, between columns -->

# Right Content
Lorem markdownum insigne...
{{</* /columns */>}}
```

{{< columns >}}
## Left Content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.

<--->

## Mid Content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter!

<--->

## Right Content
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
Miseratus fonte Ditis conubia.
{{< /columns >}}


## Mermaid Chart

{{< columns >}}
```tpl
{{</* mermaid [class="text-center"]*/>}}
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
{{</* /mermaid */>}}
```

<--->

{{< mermaid >}}
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
{{< /mermaid >}}

{{< /columns >}}


## KaTeX

{{< columns >}}

```latex
{{</* katex */>}}
x = \begin{cases}
a &\text{if } b \\
c &\text{if } d
\end{cases}
{{</* /katex */>}}
```

<--->

{{< katex >}}
x = \begin{cases}
a &\text{if } b \\
c &\text{if } d
\end{cases}
{{< /katex >}}

{{< /columns >}}


@@ -0,0 +1,9 @@
---
headless: true
---

- [Introduction]({{< relref "/" >}})
- [Guided Tour]({{< relref "/docs/guided-tour.md" >}})
- [Pinout]({{< relref "/docs/pinout.md" >}})
- [GPIO Configurations]({{< relref "/docs/gpios.md" >}})
- [Downloads]({{< relref "/docs/downloads.md" >}})
BIN +1.39 MB static/both_boards.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +197 KB static/config-i2c.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +202 KB static/config-spi.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN +899 KB static/pinout.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
<?xml version="1.0" ?><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><defs><style>.\36 62693f2-b6f0-4e95-9ab8-96bf858cbddb{fill:#ffecd1;}.\31 d466c5b-8479-441c-a0f3-5448d1f71edd,.\33 eb75bca-9574-4cad-b6bb-79c5314d3e32,.\36 62693f2-b6f0-4e95-9ab8-96bf858cbddb{fill-rule:evenodd;}.\33 eb75bca-9574-4cad-b6bb-79c5314d3e32{fill:#cbe557;}.\31 d466c5b-8479-441c-a0f3-5448d1f71edd,.a61e16dd-13bb-4e6f-ace7-d95672cfbc5b{fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:20px;}</style></defs><title/><g data-name="01 Medal" id="bb3f0ffa-1df1-43cd-a7ca-6e5deb1694d6"><path class="662693f2-b6f0-4e95-9ab8-96bf858cbddb" d="M338,406c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10S96.23,412.19,92,406c-4.23,6.19-12,10-20.5,10S55.23,412.19,51,406c-4.23,6.19-12,10-20.5,10S14.23,412.19,10,406a50.15,50.15,0,0,0,50,50H452a50.15,50.15,0,0,0,50-50c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10S342.23,412.19,338,406Z"/><path class="3eb75bca-9574-4cad-b6bb-79c5314d3e32" d="M317.5,416c8.46,0,16.27-3.81,20.5-10,4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10a50.15,50.15,0,0,0-50-50H60a50.15,50.15,0,0,0-50,50c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10c4.23,6.19,12,10,20.5,10s16.27-3.81,20.5-10C301.23,412.19,309,416,317.5,416Z"/><path class="662693f2-b6f0-4e95-9ab8-96bf858cbddb" d="M126,356H386a50.15,50.15,0,0,0,50-50c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10A50.15,50.15,0,0,0,126,356Z"/><path class="3eb75bca-9574-4cad-b6bb-79c5314d3e32" d="M276,306c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10a50.15,50.15,0,0,0-50-50H126a50.15,50.15,0,0,0-50,50c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10s15.87-3.81,20-10c4.13,6.19,11.75,10,20,10S271.87,312.19,276,306Z"/><path class="662693f2-b6f0-4e95-9ab8-96bf858cbddb" d="M216,256h55c-6.19-4.13-10-11.75-10-20s3.81-15.87,10-20c-6.19-4.13-10-11.75-10-20s3.81-15.87,10-20c-6.19-4.13-10-11.75-10-20H216Z"/><path class="3eb75bca-9574-4cad-b6bb-79c5314d3e32" d="M261,196c0,8.25,3.81,15.87,10,20-6.19,4.13-10,11.75-10,20s3.81,15.87,10,20h45V106c0-28.31-23.34-50-50-50H166a50,50,0,0,0,0,100h95c0,8.25,3.81,15.87,10,20C264.81,180.13,261,187.75,261,196Z"/><rect class="a61e16dd-13bb-4e6f-ace7-d95672cfbc5b" height="100" rx="50" ry="50" width="492" x="10" y="356"/><path class="1d466c5b-8479-441c-a0f3-5448d1f71edd" d="M126,356a50.15,50.15,0,0,1-50-50h0a50.15,50.15,0,0,1,50-50H386a50.15,50.15,0,0,1,50,50h0a50.15,50.15,0,0,1-50,50"/><path class="1d466c5b-8479-441c-a0f3-5448d1f71edd" d="M128.32,138.78c-18,2.27-25,26.27-45,28.27"/><path class="1d466c5b-8479-441c-a0f3-5448d1f71edd" d="M502,406c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10s-16.27-3.81-20.5-10c-4.23,6.19-12,10-20.5,10S96.23,412.19,92,406c-4.23,6.19-12,10-20.5,10S55.23,412.19,51,406c-4.23,6.19-12,10-20.5,10S14.23,412.19,10,406"/><path class="1d466c5b-8479-441c-a0f3-5448d1f71edd" d="M436,306c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10c-4.13,6.19-11.75,10-20,10s-15.87-3.81-20-10"/><path class="1d466c5b-8479-441c-a0f3-5448d1f71edd" d="M271,256c-6.19-4.13-10-11.75-10-20s3.81-15.87,10-20c-6.19-4.13-10-11.75-10-20s3.81-15.87,10-20c-6.19-4.13-10-11.75-10-20H166a50,50,0,0,1,0-100H266c26.66,0,50,21.69,50,50V256m-100,0V156"/><line class="a61e16dd-13bb-4e6f-ace7-d95672cfbc5b" x1="166" x2="166" y1="96.01" y2="96"/></g></svg>
BIN +749 KB static/tour_plug.jpg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3f87dc5

Please sign in to comment.
You can’t perform that action at this time.