Rich_Morin

Rich_Morin

At some point (Real Soon Now!) I expect to receive my Maslow 4.1 “Accessible Large Format CNC Router”. And, although the M4 has its own onboard processor, I’d like to add a RasPi 5 to support additional sensors and effectors (e.g., some cameras and a laser engraver).

I don’t expect to be running Nerves on the RasPi, at least initially: I won’t need most of what Nerves offers, in terms of read-only file systems and such. So, Raspberry Pi OS is probably the Golden (read, easiest) Path.

In addition, some of the available devices (e.g., the Raspberry Pi AI Camera) seem to want Raspberry Pi OS:

The IMX500’s tight integration with Raspberry Pi’s camera software stack allows users to deploy their own neural network models with minimal effort. To get started, we’ve developed a guide to get you running either a pre-packaged or custom-made neural network model on the camera.

Still, I suspect that Nerves may have libraries to support assorted interesting devices. So, I’m wondering how decoupled these are, in general, and whether they would play nicely with Raspberry Pi OS, etc. Can anyone fill me in on the current situation and/or near-term prospects? ELI5…

First 3 of 3 Posts Switch mode

gus

gus

Nerves Core Team

Even if you don’t use Nerves, there’s definitely still some cool libraries in the ecosystem which can help you out. If you want to connect sensors via I2C, SPI, UART or GPIO, check out the elixir-circuits (github) project. You can see on the webpage that there’s quite a few sensor drivers already published.

I’ve not used the Raspberry Pi AI camera (it might be different), but in general cameras are supported via V4L2 bindings. You can use the excellent evision project on a Raspberry Pi without Nerves. It wraps OpenCV to read frames from cameras and do a whole bunch of cool image processing. It even interfaces well with Nx/Axon/Bumblebee if you want to run ML models (albeit slowly) on the CPU.

Otherwise, running Elixir on a Raspberry Pi is just like running Elixir any other machine. You need to install compatible versions of Erlang/Elixir (use a tool like ASDF, the versions in the package manager are really out of date). You could use releases, but I think there will be some complexity with compiling for the correct architecture, especially if you use one of the libraries linked above which uses NIFs. It would be easier to just use mix.

Seems like a cool project - post back here if you make something neat with Elixir! :slight_smile:

lawik

lawik

Nerves Core Team

Gus is entirely right about being able to use Nerves-related libraries on other Linux-based machines. Most of them can/will work. Though with Raspberry Pi OS you already have a network manager so VintageNet might not be desirable and so on.

The AI camera has on-camera processing via some Sony piece of kit and an RPi 2040. I haven’t bought one or looked into the software they offer for that. You can assume it is not entirely straightforward to get running without Python.

Now whether we can run Python under Elixir is a very interesting question… (see Cocoa’s pythonx for example)

For the AI camera I’d say you can shell out using MuonTrap to run whatever RPi OS offers :slight_smile:

Rich_Morin

Rich_Morin OP

MuonTrap looks cool, simple, and probably quite sufficient for my needs; if need be, NimblePool (or whatever) could be used to support pools of Python interpreters.

More generally, I’m very happy to hear that most Nerves-related libraries will play nicely with Raspberry Pi OS.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
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
spammy
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
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
roeland
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
bottlenecked
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
rahultumpala
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 Top

JesseHerrick
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
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
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement