jimsynz

jimsynz

Ash Core Team

Scenic driver for fbcon?

Hi folks.

I’ve spent more than a few evenings fiddling around to get a custom system built that enables the st7789v display via the Linux fbtft driver as the console and the “hifiberry” DAC on the pirate audio board that I’m using.

Here’s a photo because it’s awesome:

The next step of the project is to start working on a Scenic based UI for the device. I’ve just tried throwing scenic_driver_nerves_rpi at it to see what happens, and while it seems to load and start correctly nothing is displayed on the console.

Currently installed is scenic 0.10.5 and scenic_driver_nerves_rpi 0.10.1.

The configuration is:

config :podbox, :viewport, %{
  name: :main_viewport,
  size: {240, 240},
  default_scene: Podbox.Scene.Main,
  drivers: [
    %{
      module: Scenic.Driver.Nerves.Rpi
    }
  ]
}

And the default scene is:

defmodule Podbox.Scenes.Main do
  use Scenic.Scene
  alias Scenic.Graph
  import Scenic.Primitives
  import Scenic.Components

  @graph Graph.build()
         |> text("Hello, World!", font_size: 22, translate: {20, 80})

  def init(_scene_args, _opts) do
    {:ok, %{graph: @graph}, push: @graph}
  end
end

Running Scenic.ViewPort.info(:main_viewport) returns:

{:ok,
 %Scenic.ViewPort.Status{
   drivers: %{
     #PID<0.2941.0> => %Scenic.ViewPort.Driver.Info{
       module: Scenic.Driver.Nerves.Rpi,
       type: "Static Monitor",
       id: nil,
       width: 1996092956,
       height: 1993753600,
       pid: #PID<0.2941.0>,
       private: nil
     }
   },
   root_config: {Podbox.Scene.Main, nil},
   root_graph: {:graph, Podbox.Scene.Main, nil},
   root_scene_pid: Podbox.Scene.Main,
   size: {240, 240},
   styles: %{},
   transforms: %{}
 }}

Does anyone have any idea what might be going wrong?

Most Liked

jimsynz

jimsynz

Ash Core Team

Thanks for the update. Yeah, this is the direction I went down to finally get it working.

I wound up pulling scenic_driver_local from main and setting SCENIC_LOCAL_TARGET=cairo-fb. The only catch being that it expects to address the framebuffer on /dev/fb0 but my display is listed as /dev/fb1. In the mean time I have symlinked it, but I’ve also raised an issue asking for it to be made configurable. I think this means that this method will also work for any of the dozens of displays that are supported by fbtft without the need for custom scenic driver packages. Great news!

jimsynz

jimsynz

Ash Core Team

Well I haven’t solved my scenic issue, but I wanted to share a photo of it in it’s case that I designed. so much fun in such a small package!

jimsynz

jimsynz

Ash Core Team

I upgraded scenic to 0.11 and switched to scenic_driver_local. No luck so far.

fmn

fmn

IT IS! thanks for sharing!

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
pgiesin
This should be a simple problem but I just can’t seem to figure it out. I have a standalone Elixir app that won’t find the database. Dep...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

Other popular topics Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
beno
I will often find my self writing things similar to: case some_value do nil -&gt; something() "" -&gt; something() _ -&gt; someth...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement