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…

Showing Posts 1 to 3

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

RSP87
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
kszambelanczyk
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
RemyXRenard
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
velrest
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
samoloth
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
FlyingNoodle
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
psy-q
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
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
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews