thovoll
Hi,
Does anyone have experience running Scenic with Nerves on RPi3, with display output going to a smaller screen that fits on top the the RPi3?
There’s quite a few ways to connect a display to an RPi3 and it’s unclear to me which ones are compatible with Scenic+Nerves.
From looking through the ads and docs of some displays, it seems they need a special driver or library. Curious if anyone has gotten one to work with Scenic+Nerves.
I did get Scenic+Nerves to draw on a regular computer monitor attached to the RPi3 via HDMI.
Thanks for any pointers,
Thomas
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
axelson
Hi! I have the officialRaspberry PI touch display (from the ElixirConf nerves training) and it’s working great with Scenic (I even have touch working!). I didn’t have to do any special setup except for configuring scenic_driver_nerves_touch.
If you want to look at my code it’s available here: GitHub - axelson/scenic_asteroids: A toy Asteroids clone written in Elixir with the Scenic UI library · GitHub
Although it won’t work without a little tweaking because I have a few external path dependencies in there.
Edit: Now there aren’t any path dependencies, so everything should work fine.
thovoll
Great, thanks! I’m looking for something smaller though, around 3.5 or 4 inch so the display fits on top of the RPi3
Something like this: Amazon.com
Or like that: PiTFT Plus 480x320 3.5 TFT+Touchscreen for Raspberry Pi : Adafruit Industries, Unique & fun DIY electronics and kits
axelson
Okay, I see. I don’t have experience with that unfortunately, but I’m sure someone will chime in!
piex
Are you using a keyboard with the rpi3? I have an rpi3 and the same touch screen plus a USB keyboard but I am not getting any keyboard events via handle_input/3 in my scene code. Works fine on MacOS, but on rpi no keyboard events.
Also haven’t figured out how touchscreen events work with the handler model in Scenic scenes, does it also work with handle_input/3? what to pattern match on? Any advice?
axelson
Haven’t tried connecting a keyboard since I don’t have a spare one at the moment and I’ve been too lazy to steal one from a computer.
My top-level handle_input captures everything:
Then the do_handle_input clauses matches on
{:cursor_posand{:cursor_button:Have you used
RingLoggerto view logs from the device? The logging is the main reason that I keep the top-levelhandle_inputaround. If you have ring logger installed you can ssh into your raspberry pi and runRingLogger.tailorRingLogger.attachto view the logs.If you want to try out my code it’s released as MIT: GitHub - axelson/scenic_asteroids: A toy Asteroids clone written in Elixir with the Scenic UI library · GitHub It’s a little asteroids clone that’s most of the way done (although there’s no way to move around on a device, unless a keyboard works, also I should rename my repository).
If you
cd fw; mix deps.get; mix firmware;and then upload the firmware to your device it should work.Also are you running your scenic program locally as well? Or just on-device?
fhunleth
Sadly, I don’t think anyone has written a non-touch input driver for Scenic on Nerves yet. The input driver at scenic_driver_nerves_touch only looks for a touchscreen sensor and processes events from it.
It seems like there could be a driver receives input from all input devices and sends them through Scenic. The input_event library looks like some code could enumerate the input sources and then start a listener on all of them. I haven’t studied the glue code to scenic, but I’d hope that the touch driver could serve as a good guide.
piex
Thanks for the info. I now have things set up with nerves init-gadget, firmware_ssh, etc and started using RingLogger over ssh. Your code examples were helpful, thanks again.
axelson
Great! I’m glad it was helpful
thovoll
To get started, I went ahead and got the official 7" Raspberry Pi screen and a matching stand. This setup will actually be better for my current needs
We’ll see where it goes later. Next step for me is to learn more Scenic and read analog input from a linear poti.
fhunleth
Update on input events to Scenic: I just submitted a PR to the input_event library to support generically identifying keyboards, mice, joysticks, touchscreens, and the other random things that show up as input devices like audio input jack detectors and power buttons. Hopefully once it gets merged (it is a big change, so might take a bit), someone can help add the Scenic driver pieces to make it work.