Skip to content

Commit dd815ce

Browse files
committed
Add IO includes for Pyduino.
0 parents  commit dd815ce

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

PyduinoIncludes/IO.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (C) 2016 Synapse Wireless, Inc.
2+
# Subject to your agreement of the disclaimer set forth below, permission is given by Synapse Wireless, Inc. ("Synapse") to you to freely modify, redistribute or include this SNAPpy code in any program. The purpose of this code is to help you understand and learn about SNAPpy by code examples.
3+
# BY USING ALL OR ANY PORTION OF THIS SNAPPY CODE, YOU ACCEPT AND AGREE TO THE BELOW DISCLAIMER. If you do not accept or agree to the below disclaimer, then you may not use, modify, or distribute this SNAPpy code.
4+
# THE CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. UNDER NO CIRCUMSTANCES WILL SYNAPSE BE LIABLE TO YOU, OR ANY OTHER PERSON OR ENTITY, FOR ANY LOSS OF USE, REVENUE OR PROFIT, LOST OR DAMAGED DATA, OR OTHER COMMERCIAL OR ECONOMIC LOSS OR FOR ANY DAMAGES WHATSOEVER RELATED TO YOUR USE OR RELIANCE UPON THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR IF SUCH DAMAGES ARE FORESEEABLE. THIS DISCLAIMER OF WARRANTY AND LIABILITY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
5+
6+
"""GPIO-related assignments for the Pyduino based on the Synapse SM220 module."""
7+
8+
# GPIO enums to be used in example scripts, mapped to Pyduino IO numbers as supported by the SNAP core firmware
9+
D0 = 16
10+
D1 = 17
11+
D2 = 20
12+
D3 = 5
13+
D4 = 23
14+
D5 = 6
15+
D6 = 7
16+
D7 = 12
17+
D8 = 0
18+
D9 = 19
19+
D10 = 21
20+
D11 = 37
21+
D12 = 4
22+
D13 = 22
23+
SDA = 9
24+
SCL = 8
25+
26+
# Analog channels
27+
A0 = 0
28+
A1 = 1
29+
A2 = 4
30+
A3 = 5
31+
A4 = 6
32+
A5 = 7
33+
34+
# List of pin assignments that can be iterated over in GPIO-order (i.e. GPIO 0 is 16, GPIO 1 is 17, etc...)
35+
GPIO_TO_IO_LIST = (16,17,20,5,23,6,7,12,0,19,21,37,4,22,9,8)
36+

PyduinoIncludes/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from IO import *

setup.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
from setuptools import setup
5+
6+
setup(
7+
name='pyduino-includes',
8+
description="Basic SNAPpy includes for the Synapse Pyduino wireless meshing development board",
9+
maintainer='Tyler Crumpton',
10+
maintainer_email='[email protected]',
11+
url='https://git.synapse-wireless.com/tyler.crumpton/pyduino-includes',
12+
packages=['PyduinoIncludes'],
13+
classifiers=[
14+
'Development Status :: 1 - Planning',
15+
'Environment :: Console',
16+
'Intended Audience :: Developers',
17+
'Operating System :: POSIX',
18+
'Programming Language :: Python :: 2.7',
19+
'Natural Language :: English',
20+
],
21+
)

0 commit comments

Comments
 (0)