From a730e3e1c1f6b184a0fe0013f5f454dfa9c26ab8 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Sat, 21 Mar 2015 23:04:31 +0000 Subject: [PATCH] GitHub and Buy Now links, rtk0000001 description, updated README --- README.md | 11 +++++++++- description/overlay/rtk-000-001.md | 32 ++++++++++++++++++++++++++++++ generate-html.py | 10 +++++++++- overlay/explorer-hat-pro.json | 2 ++ overlay/explorer-hat.json | 2 ++ 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 description/overlay/rtk-000-001.md diff --git a/README.md b/README.md index 662f821..733389d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ #Pinout 2 -Pinout 2 will be the successor to the popular Pi pinout website http://pi.gadgetoid.com/pinout +Pinout 2 is the successor to the popular Pi pinout website http://pi.gadgetoid.com/pinout This project aims to build a consistent workflow behind the Pinout front-end, and invite board manufacturers to produce their own "overlay" files which describe which pins their Pi add-ons use. @@ -8,6 +8,15 @@ to produce their own "overlay" files which describe which pins their Pi add-ons I hope that by making this project open and extensible I will invite not only contributions of board pinouts, but translation efforts too. +#Contributing + +The contents of this GitHub repository are used to build http://pi.gadgetoid.com/pinout. + +If you have a board you'd like to contribute, you should look at these folders: + +* [overlay/](overlay/) +* [description/overlay/](description/overlay/) + #Roadmap ##Phase 1 diff --git a/description/overlay/rtk-000-001.md b/description/overlay/rtk-000-001.md new file mode 100644 index 0000000..db49532 --- /dev/null +++ b/description/overlay/rtk-000-001.md @@ -0,0 +1,32 @@ +#Ryanteck Motor Controller Board + +###A quick and easy way to start driving motors on your Raspberry Pi + +```python +##Simple motor script for the RTK-000-001 +import RPi.GPIO as GPIO +import time +#Set to broadcom pin numbers +GPIO.setmode(GPIO.BCM) + +#Motor 1 = Pins 17 and 18 +#Motor 2 = Pins 22 and 23 +GPIO.setup(17, GPIO.OUT) +GPIO.setup(18, GPIO.OUT) + +#Now loop forever turning one direction for 5 seconds, then the other +while (True): + #Sleep 1 second then turn 17 on + GPIO.output(18, 0) + time.sleep(1) + GPIO.output(17, 1); + time.sleep(5); + #And now the other way round + GPIO.output(17, 0) + time.sleep(1); + GPIO.output(18, 1); + time.sleep(5); + #And loop back around +#And final cleanup +GPIO.cleanup() +``` \ No newline at end of file diff --git a/generate-html.py b/generate-html.py index ba4330e..04a5453 100755 --- a/generate-html.py +++ b/generate-html.py @@ -15,6 +15,7 @@ overlays = [ 'uart', 'i2c', 'arduino-spi', + 'rtk-000-001', 'pibrella', 'explorer-hat-pro', 'explorer-hat', @@ -71,7 +72,14 @@ def load_overlay(overlay): details.append('* Uses {} GPIO pins'.format(uses)) if 'url' in loaded: - details.append('* Resources: [{}]({})'.format(loaded['url'],loaded['url'])) + details.append('* [More Information]({url})'.format(url=loaded['url'])) + + if 'github' in loaded: + details.append('* [GitHub Repository]({url})'.format(url=loaded['github'])) + + if 'buy' in loaded: + details.append('* [Buy Now]({url})'.format(url=loaded['buy'])) + loaded['long_description'] = '{}\n{}'.format(loaded['long_description'],markdown.markdown('\n'.join(details))) diff --git a/overlay/explorer-hat-pro.json b/overlay/explorer-hat-pro.json index 6c61183..d435012 100644 --- a/overlay/explorer-hat-pro.json +++ b/overlay/explorer-hat-pro.json @@ -2,6 +2,8 @@ "name": "Explorer HAT Pro", "manufacturer": "Pimoroni", "url": "https://github.com/pimoroni/explorer-hat", + "github": "https://github.com/pimoroni/explorer-hat", + "buy": "http://shop.pimoroni.com/products/explorer-hat", "description": { "short": "An all-in-one light, input, motor, touch and output add-on board.", "long": "pibrella.md" diff --git a/overlay/explorer-hat.json b/overlay/explorer-hat.json index a9d66cf..b9045d2 100644 --- a/overlay/explorer-hat.json +++ b/overlay/explorer-hat.json @@ -2,6 +2,8 @@ "name": "Explorer HAT", "manufacturer": "Pimoroni", "url": "https://github.com/pimoroni/explorer-hat", + "github": "https://github.com/pimoroni/explorer-hat", + "buy": "http://shop.pimoroni.com/products/explorer-hat", "description": "An all-in-one light, input, touch and output add-on board.", "pincount": 40, "pin": {