argl

argl

Scenic with Nerves Rpi3 with HDMI output: Possible?

I just installed Scenic + Nerves, I can run the basic example on my laptop fine, I can successfully build fw images. But when I boot the Rpi, I can see all boot log messages scroll by and then it finally switches to a blank screen with nothing to show :confused:

I can see log messages via a remote IEx session on the device, there is nothing dramatic to be seen (Processes crashing or something). But the screen stays blank.

Should HDMI output work with the default Scenic + Nerves project setup? Is there something special to set in the /boot/config.txt or somewhere else?

Any help very much appreciated!

Most Liked

argl

argl

Solved the font problem: The hashing scheme described in the docs does evaluate the paths at compile time, which is usually the development machine’s paths and not the deployed (nerves) one.

I “fixed” it for now by differentiating a bit more and hardcoding the nerves path (bad!):

  @font_hash_path :code.priv_dir(:my_app) |> Path.join("/static/fonts/myfont.otf")

  if @target == "host" do
    @font_path @font_hash_path
  else
    @font_path "/srv/erlang/lib/my_app-0.1.0/priv/static/fonts/myfont.otf"
  end

  @font_hash Scenic.Cache.Hash.file!(@font_hash_path, :sha)

and in init/2

def init(_, opts) do
  Scenic.Cache.File.load(@font_path, @font_hash)
...

I guess thats also the problem with the built-in fonts not showing in nerves

boydm

boydm

Creator of Scenic

Just published scenic_driver_nerves_rpi 0.9.2 to hex.

This fixes the issue where the default font was not rendering on the Raspberry Pi via Nerves.

argl

argl

@axelson Yes you are right. The canonical examples try to build the graph at compile time for performance and other reasons. And hashing resources like custom fonts at runtime does not feel right.

@thovoll Nice! I also discovered that using really large fonts (>500) crashes the renderer on the RPi. It is also having a hard time on the desktop where all textures are wrong for a second after starting up. Also, line breaks in the text suddenly appear when using large fonts. (for example, rendering a screen-filling clock on a 1920x1050 display).

All in all, small things that can be resolved. I really like Scenic, thanks @boydm !

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
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
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
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

We're in Beta

About us Mission Statement