Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question not a bug... Need help on making this work on a Libre "Le Potato " #67

Open
Snakn1 opened this issue Sep 15, 2022 · 1 comment

Comments

@Snakn1
Copy link

Snakn1 commented Sep 15, 2022

I am sorry I am reading though everything and this is just what I need to migrate my weather station from a Pi to a non-pi board. (price of a pi is out of control) I am using the Libre Le Potato. Below is the info I have on the BD. I need help to create the pin_mapping for this non-pi bd. Is there anyone that can help or point me in the correct direction?

gpoi info.txt

AML-S905X-CC-V1.0A Headers.xlsx

@Snakn1 Snakn1 changed the title Question not on making this work on a Libre "Le Potato " Question not a bug... Need help on making this work on a Libre "Le Potato " Sep 15, 2022
@Snakn1
Copy link
Author

Snakn1 commented Sep 16, 2022

hello all. I created a lep.py and put it in the /usr/local/lib/python3.10/dist-packages/libre/

here is the code if this helps anyone:

-- coding: utf-8 --

Copyright (c) 2018 Richard Hull & Contributors

See LICENSE.md for details.

modified by B-Wigton 09-16-2022 to add libre Lepotato

"""
Alternative pin mappings for Libre Le Potato
(see https://docs.google.com/spreadsheets/d/1U3z0Gb8HUEfCIMkvqzmhMpJfzRqjPXq7mFLC-hvbKlE/edit?usp=sharing)

Usage:

.. code:: python
import libre.lep
from OPi import GPIO

GPIO.setmode(libre.lep.BOARD) or GPIO.setmode(libre.lep.BCM)
"""

Libre LePotato physical board pin to GPIO pin

BOARD = {
3: 5,
5: 4,
7: 98,
8: 91,
10: 92,
11: 8,
12: 6,
13: 9,
15: 10,
16: 93,
18: 94,
19: 87,
21: 88,
22: 79,
23: 90,
24: 89,
26: 80,
27: 75,
28: 76,
29: 96,
31: 97,
32: 95,
33: 85,
35: 86,
36: 81,
37: 84,
38: 82,
40: 83,
}

No reason for BCM mapping, keeping it for compatibility

BCM = BOARD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant