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

With all the chip shortages would this work with a full Pi 3 instead of the Zero? #10

Open
Eforen opened this issue May 4, 2022 · 8 comments
Labels
question Further information is requested

Comments

@Eforen
Copy link

Eforen commented May 4, 2022

With all the chip shortages would this work with a full Pi 3 instead of the Zero?

@Anodynous
Copy link
Owner

I haven't tested it on anything beside the two pi0w models so cannot say. Don't see a reason it couldn't be made to work with some effort, but it probably isn't going to work right out of the box. I unfortunately do not have a Pi3 or 4 myself so would have a hard time assisting with debugging or modifying the code.

@Anodynous Anodynous added the question Further information is requested label May 4, 2022
@isaacrbeam
Copy link

Hello All and future reader.

TL;DR: Confirmed working with Pi 4 B.

Great work @Anodynous this project is super cool once it all works. Much like @Eforen the chip shortage is still in play as a pi zero w 1.1 (very old model) has been selling on ebay for around 50 to 60 usd a price that is absolutely crazy. I say that as I have just (matter of fact 10 mins ago) can confirm that this works with a Pi4 B 2GB. It did take a little tweaking requiring a few different versions of packages but at the end I manage to get it to work.

To help others and to provide a little bit of context I wanted to document the changes I made in the build to configure stenogotchi to work for Pi 4.

Step 1 : Install DietPi Raspberry Pi 1/Zero (1) image and NOT Raspberry Pi 2/3/4
I received a lot of weird package errors when installing on the Rasp 2/3/4 img vs the Pi zero image. Your mileage may very but Pi Zero dietpi worked and as the application is light I felt no need to optimize the additional core usage as Ideally a pi zero will one day be used.

Step 2: Critical for Pi 4 users ---- USE WIFI --- The current state of the software auto launches the web ui (after next tweek) after and only after wifi is connected and not ethernet is used. Maybe feature request down the line but to be honest wifi works well just need to set it up to start with and you will not be scratching your head as to why nothing works.

Step 3: WEB UI enable

In search to determine how to make the software run, I discovered that Anodynous has built and included a webUI. The documentation on this was a bit light and a simple photo would have saved me a few hours of digging but tweak the config to allow the UI.

download

I also removed the use of the button SHIM, UPSlite, and Eink display as I had none of the additional features.

Here is my final config:

nano /etc/stenogotchi/config.toml

main.plugins.buttonshim.enabled = false
main.plugins.upslite.enabled = false
main.plugins.evdevkb.enabled = true
main.plugins.plover_link.bt_autoconnect_mac = 'MAC ADDRESS HERE'
ui.display.enabled = false
ui.web.enabled = true
ui.web.address = "192.168.1.3"
ui.web.username = "admin"
ui.web.password = "admin"

Step 4: The Bread and Potato. This is where after hours of trials I managed to get it all to work. The key take away is to follow the version control as outlined in the requirments.txt to a T. With that being said, I did get a few additional error that was solved with different version control. The following command can be ran after set up to change the package versions which I found to be the solution to get stenogotchi to work with my Pi 4 B+.

pip3 install werkzeug==2.0.3 flask==1.1.1 flask-cors==3.0.10 flask-wtf==0.14.3 Jinja2==3.1.2 itsdangerous==2.0.1

Here is the list of all of the versions of packages as My version of

Package Version


  • appdirs 1.4.4
  • click 8.1.3
  • dbus-python 1.3.2
  • evdev 1.6.1
  • file-read-backwards 2.0.0
  • Flask 1.1.1
  • Flask-Cors 3.0.10
  • Flask-WTF 0.14.3
  • importlib-metadata 6.0.0
  • itsdangerous 2.0.1
  • Jinja2 3.0.3
  • jsonpickle 3.0.1
  • MarkupSafe 2.1.2
  • Pillow 9.4.0
  • pip 20.3.4
  • plover 4.0.0.dev10
  • pycairo 1.23.0
  • PyGObject 3.38.0
  • pyphen 0.13.2
  • pyserial 3.5
  • python-xlib 0.33
  • RPi.GPIO 0.7.0
  • setuptools 52.0.0
  • six 1.16.0
  • spidev 3.6
  • stenogotchi-link 0.3.0
  • textstat 0.7.3
  • toml 0.10.2
  • wcwidth 0.2.6
  • Werkzeug 2.0.3
  • wheel 0.34.2
  • WTForms 3.0.1
  • zipp 3.15.0

This is a very cool project and I have had a blast to get the software to work. My goal is to learn steno on my Chromebook and this is the small translator needed to allow the steno keyboard to be used anywhere. @Anodynous If you are at all interested in need for another developer / maintainer I'd be happy to contribute to this project.

I have a few ideas that would be perfect enhancements to this project:

  • No idea if possible, add a wired option in addition to Bluetooth.
    • Steno keyboard> PI > BT or WIRE > PC/Chromebook/Android Phone
      -Capture to memory/sd card with steno or keyboard
    • If button pressed, then user can type and input would be saved to memory / sd card,
    • Maybe even output to eink
    • Idea would be for offline, quick, distraction free, writer mode no need to have anything but pi and keyboard/steno board.

@Anodynous
Copy link
Owner

Excellent write-up, thank you for sharing this! I know people have struggled in the past getting it to run on alternative hardware and this guide should prove useful for those attempting the same in the future.

I haven't actively worked on this project for a while now and feel the recent embedded steno solutions, like Javelin, do a much better job of filling the gap this project is targeting. However, feel free to submit pull requests for improvements you have in mind. Especially decreasing the latency of text output is something that could and should be improved still.

No idea if possible, add a wired option in addition to Bluetooth.

The rpi0w can't support this but could be a nice option for other hardware.

Capture to memory/sd card with steno or keyboard
If button pressed, then user can type and input would be saved to memory / sd card,
Maybe even output to eink
Idea would be for offline, quick, distraction free, writer mode no need to have anything but pi and keyboard/steno board.

I originally had this on the roadmap but scrapped it in the end. The eINK screen is always going to be a worse experience (small size, slow refresh rate) than just connecting it to your phone.

@Eforen
Copy link
Author

Eforen commented Apr 3, 2023

It would be awesome if we could get it working on a ESP32 hooked up to a small screen. (Chip Shortage is still nasty)

@isaacrbeam
Copy link

It would be awesome if we could get it working on a ESP32 hooked up to a small screen. (Chip Shortage is still nasty)

TL;DR - I agree with you on the chip shortage.

I've actually been having a wacky bluetooth bug with dietpi. I'd like to find hardware that supports usb-a/usb-c power and data for simple keyboard plug n play (Chromebook or Phone use) a small oled screen would be perfect too.

With the plover library and speed of hardware. To my limited knowledge it will need to run some degree of Linux. At least for the moment. Additional experimenting required. Maybe a form of app? Or webpage interpret??? I have ideas but limited scope understanding to the nature of how it can play.

My goal would be some sort of simple kinda small ( size altoids can size) hardware for offline stored writing and to be plug in play with target devices.

@baybled
Copy link

baybled commented Apr 21, 2023

I think there's a workaround for rpi0/rpi0w/rpi02w etc. to use the 'usb-gadget mode' in order to send commands as if it's a HID device. So wired + wireless support looks okay as long as the device is willing to accept USB keyboards and has drivers to do so
https://randomnerdtutorials.com/raspberry-pi-zero-usb-keyboard-hid/

@Anodynous
Copy link
Owner

Simulating a HID device over USB isn't the problem, that is definitely doable. But I don't believe the hardware of the rpi0/rpi0w can handle both a USB device for input while simultaneously emulating a HID device for output over USB. The input device would have to be wired directly to the GPIO pins.

@Eforen
Copy link
Author

Eforen commented May 22, 2023

Thats doable though it does have GPIO pins

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

No branches or pull requests

4 participants