{"id":17053678,"url":"https://github.com/hoffi/nerves_system_rpi_iio","last_synced_at":"2026-04-17T01:02:18.675Z","repository":{"id":139297360,"uuid":"192800100","full_name":"hoffi/nerves_system_rpi_iio","owner":"hoffi","description":"Fork of https://github.com/nerves-project/nerves_system_rpi with IIO, DHT11 and BMP280 Drivers enabled","archived":false,"fork":false,"pushed_at":"2019-06-19T20:30:49.000Z","size":271,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T05:26:08.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoffi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-19T20:29:04.000Z","updated_at":"2019-10-23T14:01:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"78588480-d642-4042-b772-c81172c4f6a4","html_url":"https://github.com/hoffi/nerves_system_rpi_iio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hoffi/nerves_system_rpi_iio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoffi%2Fnerves_system_rpi_iio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoffi%2Fnerves_system_rpi_iio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoffi%2Fnerves_system_rpi_iio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoffi%2Fnerves_system_rpi_iio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoffi","download_url":"https://codeload.github.com/hoffi/nerves_system_rpi_iio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoffi%2Fnerves_system_rpi_iio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266572410,"owners_count":23950016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T10:12:57.292Z","updated_at":"2026-04-17T01:02:18.613Z","avatar_url":"https://github.com/hoffi.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Model A+, B, and B+\n\n[![CircleCI](https://circleci.com/gh/nerves-project/nerves_system_rpi.svg?style=svg)](https://circleci.com/gh/nerves-project/nerves_system_rpi)\n[![Hex version](https://img.shields.io/hexpm/v/nerves_system_rpi.svg \"Hex version\")](https://hex.pm/packages/nerves_system_rpi)\n\nThis is the base Nerves System configuration for the Raspberry Pi A+, B,\nand B+. It will also work with the Raspberry Pi Zero, but usually\n[nerves_system_rpi0](https://github.com/nerves-project/nerves_system_rpi0) is\npreferable since it configures the USB port so that it can be plugged into\na computer. This is very convenient for powering and debugging the Pi Zero.\nIf you want to use the Raspberry Pi Zero's USB port in \"host\" mode (e.g.,\nto attach a USB Flash drive or other peripheral), then this repository\nworks and may be more appropriate.\n\nThis is not the configuration for the Raspberry Pi 2 or 3.\n\n![Fritzing Raspberry Pi A+ image](assets/images/raspberry-pi-model-a-plus.png)\n\u003cbr\u003e\u003csup\u003e[Image credit](#fritzing)\u003c/sup\u003e\n\n| Feature              | Description                     |\n| -------------------- | ------------------------------- |\n| CPU                  | 700 MHz ARM1176JZF-S for A+, B, and B+, 1 GHz ARM1176JZF-S for the Zero  |\n| Memory               | 256 MB for rev 1 boards, 512 MB for rev 2 and the Zero  |\n| Storage              | MicroSD                         |\n| Linux kernel         | 4.19 w/ Raspberry Pi patches    |\n| IEx terminal         | HDMI and USB keyboard (can be changed to UART)   |\n| GPIO, I2C, SPI       | Yes - [Elixir Circuits](https://github.com/elixir-circuits) |\n| ADC                  | No                              |\n| PWM                  | Yes, but no Elixir support      |\n| UART                 | 1 available - `ttyAMA0`         |\n| Camera               | Yes - via rpi-userland          |\n| Ethernet             | Yes (only on the B and B+)      |\n| WiFi                 | Requires USB WiFi dongle        |\n| Bluetooth            | Not supported                   |\n| Audio                | HDMI/Stereo out                 |\n\n## Using\n\nThe most common way of using this Nerves System is create a project with `mix\nnerves.new` and to export `MIX_TARGET=rpi`. See the [Getting started\nguide](https://hexdocs.pm/nerves/getting-started.html#creating-a-new-nerves-app)\nfor more information.\n\nIf you need custom modifications to this system for your device, clone this\nrepository and update as described in [Making custom\nsystems](https://hexdocs.pm/nerves/systems.html#customizing-your-own-nerves-system)\n\nIf you're new to Nerves, check out the\n[nerves_init_gadget](https://github.com/nerves-project/nerves_init_gadget)\nproject for creating a starter project. It will get you started with the basics\nlike bringing up networking, initializing the writable application data\npartition, and enabling ssh-based firmware updates.  It's easiest to begin by\nusing the wired Ethernet interface 'eth0' and DHCP if you have a model B/B+.\n\n## Supported USB WiFi devices\n\nThe base image includes drivers and firmware for Ralink RT53xx\n(`rt2800usb` driver) and RealTek RTL8712U (`r8712u` driver) devices.\n\nWe are still working out which subset of all possible WiFi dongles to\nsupport in our images. At some point, we may have the option to support\nall dongles and selectively install modules at packaging time, but until\nthen, these drivers and their associated firmware blobs add significantly\nto Nerves release images.\n\nIf you are unsure what driver your WiFi dongle requires, run Raspbian and\nconfigure WiFi for your device. At a shell prompt, run `lsmod` to see which\ndrivers are loaded.  Running `dmesg` may also give a clue. When using `dmesg`,\nreinsert the USB dongle to generate new log messages if you don't see them.\n\n## Audio\n\nThe Raspberry Pi has many options for audio output. This system supports the\nHDMI and stereo audio jack output. The Linux ALSA drivers are used for audio\noutput.\n\nTo try it out, run:\n\n```elixir\n:os.cmd('espeak -ven+f5 -k5 -w /tmp/out.wav Hello')\n:os.cmd('aplay -q /tmp/out.wav')\n```\n\nThe general Raspberry Pi audio documentation mostly applies to Nerves. For\nexample, to force audio out the HDMI port, run:\n\n```elixir\n:os.cmd('amixer cset numid=3 2')\n```\n\nChange the last argument to `amixer` to `1` to output to the stereo output jack.\n\n## Provisioning devices\n\nThis system supports storing provisioning information in a small key-value store\noutside of any filesystem. Provisioning is an optional step and reasonable\ndefaults are provided if this is missing.\n\nProvisioning information can be queried using the Nerves.Runtime KV store's\n[`Nerves.Runtime.KV.get/1`](https://hexdocs.pm/nerves_runtime/Nerves.Runtime.KV.html#get/1)\nfunction.\n\nKeys used by this system are:\n\nKey                    | Example Value     | Description\n:--------------------- | :---------------- | :----------\n`nerves_serial_number` | `\"12345678\"`      | By default, this string is used to create unique hostnames and Erlang node names. If unset, it defaults to part of the Raspberry Pi's device ID.\n\nThe normal procedure would be to set these keys once in manufacturing or before\ndeployment and then leave them alone.\n\nFor example, to provision a serial number on a running device, run the following\nand reboot:\n\n```elixir\niex\u003e cmd(\"fw_setenv nerves_serial_number 12345678\")\n```\n\nThis system supports setting the serial number offline. To do this, set the\n`NERVES_SERIAL_NUMBER` environment variable when burning the firmware. If you're\nprogramming MicroSD cards using `fwup`, the commandline is:\n\n```sh\nsudo NERVES_SERIAL_NUMBER=12345678 fwup path_to_firmware.fw\n```\n\nSerial numbers are stored on the MicroSD card so if the MicroSD card is\nreplaced, the serial number will need to be reprogrammed. The numbers are stored\nin a U-boot environment block. This is a special region that is separate from\nthe application partition so reformatting the application partition will not\nlose the serial number or any other data stored in this block.\n\nAdditional key value pairs can be provisioned by overriding the default provisioning.conf\nfile location by setting the environment variable\n`NERVES_PROVISIONING=/path/to/provisioning.conf`. The default provisioning.conf\nwill set the `nerves_serial_number`, if you override the location to this file,\nyou will be responsible for setting this yourself.\n\n## Linux kernel and RPi firmware/userland\n\nThere's a subtle coupling between the `nerves_system_br` version and the Linux\nkernel version used here. `nerves_system_br` provides the versions of\n`rpi-userland` and `rpi-firmware` that get installed. I prefer to match them to\nthe Linux kernel to avoid any issues. Unfortunately, none of these are tagged by\nthe Raspberry Pi Foundation so I either attempt to match what's in Raspbian or\ntake versions of the repositories that have similar commit times.\n\n[Image credit](#fritzing): This image is from the [Fritzing](http://fritzing.org/home/) parts library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoffi%2Fnerves_system_rpi_iio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoffi%2Fnerves_system_rpi_iio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoffi%2Fnerves_system_rpi_iio/lists"}