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
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
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
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (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.