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

Request/Idea: Add Waveshare 1.3 LCD (button IO is different) #363

Closed
edwinvanpoeijer opened this issue Jan 14, 2022 · 5 comments
Closed
Labels
enhancement New feature or request implemented under investigation Being studied for implementation in next version

Comments

@edwinvanpoeijer
Copy link

I am using a Waveshare 1.3 LCD, the one with 3 buttons and joystick.

This will need some small tweaking but this display can be bought cheaply through Aliexpress or Amazon,
https://www.waveshare.com/wiki/1.3inch_LCD_HAT

The display will work right out the box but the buttons need some tweaking in de _SetupDisplatyT7789, would be nice to do this while starting up as argument in the -O display.
The buttons are on D16, D20, D21.

        self.buttonA = digitalio.DigitalInOut(board.D20)
        self.buttonB = digitalio.DigitalInOut(board.D16)

When changing the portnumbers FortiusANT went into shutdown without any button press. After some investigation i found out that the ports are switched to input but without Pull.Up. They may not be needed for the Adafruit display?

        self.buttonA.switch_to_input(digitalio.Pull.UP)
        self.buttonB.switch_to_input(digitalio.Pull.UP)
@WouterJD
Copy link
Owner

Hi @edwinvanpoeijer great work; as soon as operational a nice picture can be added to the Raspberry Hall of Fame!

I have some options

  • -O st7789b; statically defining the buttons on pins 20/16
  • -O st7789-20-16/0; same but descriptive name
  • -O st7789/0/20/16; same but through separate parameters which is a bit more future-proof but requires more documentation and testing.

... to be continued :-)

The pull-up thing is to be implemented anyway.

@edwinvanpoeijer
Copy link
Author

edwinvanpoeijer commented Jan 14, 2022

I would choose the third option so it is more future proof. (although the other buttons don't have any function?).

Busy getting it operational :)
Running into a small problem, but that has nothing to do with de display.
I am using a distribution without xwindows, everything works fine if i login as pi and start FortiusANT.
If i do the same but then automatically (tried all variations) FortiusANT will start but bluetooth is not working. Well, FortiusANT thinks its working but Zwift doesn't see any bluetooth device.

As soon as everything is working i will post the setup :)

@WouterJD
Copy link
Owner

FortiusAnt uses node.js for BLE, debugging may be complex to understand what is not working well. If youhave a clear problem-description, please create new issue.

@WouterJD WouterJD added enhancement New feature or request implemented under investigation Being studied for implementation in next version labels Jan 14, 2022
@WouterJD
Copy link
Owner

WouterJD commented Jan 14, 2022

I've gone for the easy way: -O st7789b which should do the job. If there will pop up more displays, a more sophisticated implementation can be done.

Please validate the branch (two new modules in pythoncode FortiusAntCommand.py and raspberry.py):
https://github.com/WouterJD/FortiusANT/tree/Issue-%23363-Add-Waveshare-1.3-LCD
as referred in the pull request:
#365

WouterJD added a commit that referenced this issue Feb 23, 2022
* #363 st7789b added; Waveshare 1.3 LCD with different pin layout

* PR#365 define waveshare pins

* PR #365 Waveshare reset pins
WouterJD added a commit that referenced this issue Aug 9, 2022
* #363 st7789b added; Waveshare 1.3 LCD with different pin layout

* PR#365 define waveshare pins

* PR #365 Waveshare reset pins

* Collector first version; write to FitnessMachineControlPoint fails

* bleClient.py working on Raspberry pi0W raspbian 10 (buster)

* bleClient.py works on rpi0W with raspbian v10 buster

* bleClient.py works on rpi0W with raspbian v10 buster

* Server still under editing

* bleBleak.py works on rpi0W with raspbian v10 buster

* bleBleak.py works on rpi0W with raspbian v10 buster

* FortiusAnt now works with bless library, ready for fieldtest

* spaces removed

* bless implementation works on Windows & Raspberry

* General Access Profile, further tests

* Made available to bless as example

* Code cleanup

* logfile improvements

* Improved error handling and Changed access rights

* -dall activates all debug options

* -d log activates all logging but not json

* -d all and -d log code improvement

* manual for #366 and problem solved for #373

* #379 fonts-dejavu added in install

* #366 install bless library from development branch

* Version 6.4 candidate for merge

* Small manual update

* Release BLE/bless, version 6.5

* Last manual update for release of BLE/bless
@WouterJD
Copy link
Owner

WouterJD commented Aug 9, 2022

Implemented and released

@WouterJD WouterJD closed this as completed Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implemented under investigation Being studied for implementation in next version
Projects
None yet
Development

No branches or pull requests

2 participants