master
Ondřej Hruška 7 years ago
commit 5f30b13087
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 3
      .gitignore
  2. 6
      _footer.php
  3. 39
      _header.php
  4. 24
      contact.php
  5. 13
      convert.sh
  6. 93
      css/application.css
  7. 132
      css/application.scss
  8. 69
      downloads.php
  9. 58
      features.php
  10. BIN
      img/bode.png
  11. BIN
      img/gexen.jpg
  12. BIN
      img/zero.jpg
  13. 33
      index.php
  14. 29
      js/utils.js
  15. 26
      platforms.php
  16. 2
      public/.gitignore

3
.gitignore vendored

@ -0,0 +1,3 @@
*.map
.sass-cache
.idea/

@ -0,0 +1,6 @@
<footer>
<div>
GEX is a project by Ondřej Hruška (MightyPork)
</div>
</footer>
</body></html>

@ -0,0 +1,39 @@
<?php
$cli = defined('STDIN');
$suf = $cli ? '.html' : '.php';
list($curpage, ) = explode('.', basename($curpage));
$pages = [
"index" => 'What is GEX',
"features" => 'Features',
"platforms" => 'Platforms',
"downloads" => 'Downloads',
"contact" => 'Get Involved',
];
?><!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>GEX - <?= $pages[$curpage] ?></title>
<link rel="stylesheet" href="css/application.css">
</head>
<body>
<header id="PageHeader">
<div>
<span id="top"></span>
<span class="Title">GEX</span><br>
<span class="Subtitle">...the GPIO header for your PC</span>
</div>
</header>
<section>
<nav>
<?php
foreach ($pages as $page => $label) {
echo "<a href=\"$page$suf\"";
if ($curpage == $page) echo ' class="active"';
echo ">$label</a>";
}
?>
</nav>
</section>

@ -0,0 +1,24 @@
<?php $curpage = basename(__FILE__); require '_header.php'; ?>
<section>
<div>
<h1>How to Contribute</h1>
<p>
GEX is open-source, and I want it to grow beyond the current one-man-show.
A <a href="https://github.com/gexpander/">GitHub mirror</a> of most of the GEX
repositories is available and regularly updated to match the upstream.
Feel free to send pull requests or issues to these repos.
</p>
<h1>Contact</h1>
<p>
You can reach me by e-mail at <a href="mailto:ondra@ondrovo.com">ondra@ondrovo.com</a>,
or send me a message on Mastodon (GNU Social compatible): <a>@MightyPork@dev.glitch.social</a>
</p>
</div>
</section>
<?php require '_footer.php'; ?>

@ -0,0 +1,13 @@
#!/bin/bash
php contact.php > public/contact.html
php downloads.php > public/downloads.html
php features.php > public/features.html
php index.php > public/index.html
php platforms.php > public/platforms.html
cp -r img public/
cp -r css public/
cp -r js public/
echo "Done."

@ -0,0 +1,93 @@
html, body {
width: 100%;
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
color: #333;
font-size: 16pt;
margin: 0;
padding: 0; }
body {
overflow-y: scroll; }
*, *::before, *::after {
box-sizing: border-box; }
a {
color: #005e5e;
text-decoration: none; }
a:hover {
color: #001d5e;
text-decoration: none; }
section, header, footer {
width: 100%; }
section > *, header > *, footer > * {
max-width: 850px;
margin: 0 auto;
padding: 10pt 0; }
section, header {
border-bottom: 4px solid darkcyan; }
section h1:first-child, header h1:first-child {
margin-top: .4em; }
section + section {
border-bottom: none; }
section + section > * {
border-bottom: 2px dashed rgba(0, 139, 139, 0.5); }
section:last-of-type {
border-bottom: 4px solid darkcyan; }
section:last-of-type > * {
border-bottom: 0 none; }
header .Title {
font-size: 40pt;
font-weight: bold;
letter-spacing: 2pt; }
header .Subtitle {
font-size: 24pt; }
nav a {
padding-right: 10pt;
padding-left: 10pt;
border-right: 2px solid darkcyan; }
nav a:first-child {
padding-left: 0; }
nav a:last-child {
border-right: 0 none; }
nav a.active {
font-weight: bold; }
h1 a {
opacity: .3;
margin-left: 6pt; }
h1 a:hover {
opacity: .6; }
p {
text-align: justify; }
h2 {
font-size: 110%; }
footer {
text-align: left;
font-size: 12pt;
color: #066;
opacity: .5;
font-style: italic; }
section img {
max-width: 100%; }
div.center {
text-align: center; }
div.aside {
float: right;
margin-left: 16pt;
margin-bottom: 16pt; }
/*# sourceMappingURL=application.css.map */

@ -0,0 +1,132 @@
$fg: #333;
$bg: #fff;
html, body {
width: 100%;
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
color: $fg;
font-size: 16pt;
margin: 0; padding: 0;
}
body {
overflow-y: scroll;
}
*, *::before, *::after {
box-sizing: border-box;
}
a {
color: #005e5e;
text-decoration: none;
&:hover {
color: #001d5e;
text-decoration: none;
}
}
section, header, footer {
width: 100%;
> * {
max-width: 850px;
margin: 0 auto;
padding: 10pt 0;
}
}
section, header {
border-bottom: 4px solid darkcyan;
h1:first-child {
margin-top: .4em;
}
}
section + section {
border-bottom: none;
> * {
border-bottom: 2px dashed rgba(darkcyan, .5)
}
}
section:last-of-type {
border-bottom: 4px solid darkcyan;
> * {
border-bottom: 0 none;
}
}
header {
.Title {
font-size: 40pt;
font-weight: bold;
letter-spacing: 2pt;
}
.Subtitle {
font-size: 24pt;
}
}
nav a {
padding-right: 10pt;
padding-left: 10pt;
border-right: 2px solid darkcyan;
&:first-child {
padding-left: 0;
}
&:last-child {
border-right: 0 none;
}
&.active {
font-weight: bold;
}
}
h1 a {
opacity: .3;
margin-left: 6pt;
&:hover {
opacity: .6;
}
}
p {
text-align: justify;
}
h2 {
font-size: 110%;
}
footer {
text-align: left;
font-size: 12pt;
color: #066;
opacity: .5;
font-style: italic;
}
section img {
max-width: 100%;
}
div.center {
text-align: center;
}
div.aside {
float: right;
margin-left: 16pt;
margin-bottom: 16pt;
}

@ -0,0 +1,69 @@
<?php $curpage = basename(__FILE__); require '_header.php'; ?>
<section>
<div>
<h1>Thesis</h1>
<p>
I've developed the hardware prototypes and the original firmware (1.0) for my Master's Thesis.
The thesis text may be used as a manual for this firmware version.
</p>
<p>
<a href="https://www.ondrovo.com/cvut/dp">Thesis PDF + attachments</a>
</p>
</div>
</section>
<section>
<div>
<h1>Firmware</h1>
<p>
Pre-compiled firmware images are stored in the
<a href="https://git.ondrovo.com/gex/gex-binaries">GEX binaries repository</a>.
</p>
<h2>Source Code</h2>
<p>
GEX is open-source, all its repositories can be found at <a href="https://git.ondrovo.com/gex">git.ondrovo.com/gex</a>.
Important firmware repositories:
</p>
<ul>
<li><a href="https://git.ondrovo.com/gex/gex-f072">STM32F072</a>
<li><a href="https://git.ondrovo.com/gex/gex-core">GEX Core</a> (included in ports as a submodule)
</ul>
</div>
</section>
<section>
<div>
<h1>PC Libraries</h1>
<p>
The protocol is described in the GEX Thesis, which should be enough to port it to any language.
Two libraries were developed as a proof of concept:
</p>
<ul>
<li><a href="https://git.ondrovo.com/gex/gex-client-py">Python Library</a> (recommended)
<li><a href="https://git.ondrovo.com/gex/gex-client-c">C Library</a>
</ul>
</div>
</section>
<section>
<div>
<h1>Custom Hardware</h1>
<p>
The <a href="https://git.ondrovo.com/gex/gex-hardware">GEX hardware</a> is open source, too.
The PCBs are drawn in Altium, but the respository includes gerber files and PDFs to make it more accessible.
</p>
</div>
</section>
<?php require '_footer.php'; ?>

@ -0,0 +1,58 @@
<?php $curpage = basename(__FILE__); require '_header.php'; ?>
<section>
<div>
<h1>Features</h1>
<p>
The project started as a STM32 alternative to BusPirate, offering access to the many
hardware peripherals of STM32 microcontrollers. The firmware is modular, composed of
functional blocks (“units”) that may be activated and configured by the user through
INI configuration files. Those files are stored inside the module and edited
programmatically, or with a text editor on a virtual FAT16 USB disk.
</p>
<p>
GEX is used as a GPIO header for the PC, except besides GPIO it also supports a range
of hardware buses, and several analog features. The device is configured for a particular
hardware setup, but the control script runs on the host PC. This lets you build graphical
applications above the low level control code with PyQt or other toolkits, process
data with NumPy or SciPy, and more. When needed, the Python library may be called from
within MATLAB, too.
</p>
<h2>Connection</h2>
<p>
GEX can be connected through USB (CDC/ACM - virtual COM port), by a hardware UART, or
wirelessly, using a nRF24L01+ transceiver module.
</p>
<h2>Hardware Functions</h2>
<p>
The firmware version 1.0 for STM32F072 contains the following key features:
</p>
<ul>
<li>Direct GPIO pin access
<li>SPI master
<li>I²C master
<li>UART/USART
<li>1-Wire master (including the search algorithm)
<li>PWM output
<li>Frequency and duty cycle measurement
<li>ADC with oscilloscope-like features
<li>DAC (analog output) with waveform generation based on DDS
</ul>
<p>
Some features (specifically the analog ones) are experimental and exhibit various
limitations. These will be addressed in a later firmware version, possibly as a full
rewrite.
</p>
</div>
</section>
<?php require '_footer.php'; ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

@ -0,0 +1,33 @@
<?php $curpage = basename(__FILE__); require '_header.php'; ?>
<section>
<div>
<h1>What is GEX</h1>
<p>
GEX is a general purpose input/output device that attaches to a PC or laptop.
The module, controlled by a Python or C program running on the host PC, provides easy
access to on-chip peripherals and low level functions implemented by the firmware.
</p>
<p>
The platform is designed for quick hardware prototyping, tinkering, automation, and measurements.
In addition to custom hardware, the firmware can run on STM32 development boards,
which makes it accessible to everyone. Even better, a version for the eBay-popular
STM32F103 Bluepill board is planned.
</p>
<div class="center">
<img src="img/zero.jpg" alt="GEX Zero v1">
</div>
<p>
You can try GEX right now, perhaps with one of the pre-built firmware images, but keep in mind
that it is still under development and despite having version 1.0.0, it is closer to
beta than a stable release. In particular, the API may change in backward-incompatible ways
(obviously accompanied by a minor version bump).
</p>
</div>
</section>
<?php require '_footer.php'; ?>

@ -0,0 +1,29 @@
function headingAnchors(self_link_text) {
self_link_text = self_link_text || '#';
var headings = document.querySelectorAll('h1');
for (var i = 0; i < headings.length; i++) {
var e = headings[i];
if (!e.id) {
var tc = e.textContent;
tc = tc.replace(/[^a-z0-9-]/gi, '-')
.replace(/-{2,}/gi, '-')
.replace(/-+$/gi, '')
.toLowerCase();
e.id = tc;
}
var a = document.createElement('a');
a.href = '#' + e.id;
a.target = "_self";
a.textContent = self_link_text;
e.appendChild(a);
}
// Scroll to the given hash
var h = location.hash;
location.hash = '';
location.hash = h;
}

@ -0,0 +1,26 @@
<?php $curpage = basename(__FILE__); require '_header.php'; ?>
<section>
<div>
<h1>Supported Platforms</h1>
<p>
The original GEX firmware targets the STM32F072 microcontroller, which is used in the
two custom hardware modules; you can see some of these in the photo below. In the future
I hope to port it to STM32F103, and later to STM32F303 or others. A reimplementation
for the ESP32 is also an exciting possibility, though it would be even more challenging.
</p>
<p>
The PC libraries were written and tested on Linux. The Python library should be portable
to other systems, as it uses PySerial and PyUSB, but I didn't try it.
</p>
<div class="center">
<img src="img/gexen.jpg" alt="Photo fo several GEX prototypes">
</div>
</div>
</section>
<?php require '_footer.php'; ?>

2
public/.gitignore vendored

@ -0,0 +1,2 @@
*
!.gitignore
Loading…
Cancel
Save