{"id":32292590,"url":"https://github.com/vinicentus/rpi_serial","last_synced_at":"2026-02-19T21:52:22.137Z","repository":{"id":56838360,"uuid":"194401003","full_name":"vinicentus/rpi_serial","owner":"vinicentus","description":"rpi_serial is a Dart package for using serial communication on the Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2019-06-29T12:04:12.000Z","size":67,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-23T03:33:43.540Z","etag":null,"topics":["dart","gpio","raspberry-pi","serial"],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vinicentus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-29T12:03:16.000Z","updated_at":"2022-01-20T21:53:02.000Z","dependencies_parsed_at":"2022-09-13T04:32:41.998Z","dependency_job_id":null,"html_url":"https://github.com/vinicentus/rpi_serial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vinicentus/rpi_serial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicentus%2Frpi_serial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicentus%2Frpi_serial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicentus%2Frpi_serial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicentus%2Frpi_serial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinicentus","download_url":"https://codeload.github.com/vinicentus/rpi_serial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinicentus%2Frpi_serial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29634417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T18:02:07.722Z","status":"ssl_error","status_checked_at":"2026-02-19T18:01:46.144Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["dart","gpio","raspberry-pi","serial"],"created_at":"2025-10-23T03:22:30.342Z","updated_at":"2026-02-19T21:52:22.133Z","avatar_url":"https://github.com/vinicentus.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpi_serial\n\nrpi_serial is a Dart package for using serial communication on the Raspberry Pi.\n\n## Overview\n\n* The [__Serial__](lib/serial.dart) library provides the API for accessing devices\n   using the [serial protocol](https://en.wikipedia.org/wiki/Serial_communication)\n\n* The [__RpiSerial__](lib/rpi_serial.dart) library provides implementation of\n   the serial protocol on the Raspberry Pi derived from the [WiringPi](http://wiringpi.com/) library.\n\n## Setup\n\nBe sure to enable serial on the Raspberry Pi using\n\n```shell\nsudo raspi-config\n```\n\nAlso make sure to disable the console on the serial port.\n\n[__RpiSerial__](lib/rpi_serial.dart) uses a native library written in C.\nFor security reasons, authors cannot publish binary content\nto [pub.dev](https://pub.dev/), so there are some extra\nsteps necessary to compile the native library on the RPi before this package\ncan be used. These two steps must be performed when you install and each time\nyou upgrade the rpi_serial package.\n\n1. Activate the rpi_serial package using the\n[pub global](https://dart.dev/tools/pub/cmd/pub-global) command.\n\n```dart\npub global activate rpi_serial\n```\n\n2. From your application directory (the application that references\nthe rpi_serial package) run the following command to build the native library\n\n```dart\npub global run rpi_serial:build_lib\n```\n\n3. Deactivate the rpi_serial package.\n\n```dart\npub global deactivate rpi_serial\n```\n\n[pub global activate](https://dart.dev/tools/pub/cmd/pub-global#activating-a-package)\nmakes the Dart scripts in the rpi_serial/bin directory runnable\nfrom the command line.\n[pub global run](https://dart.dev/tools/pub/cmd/pub-global#running-a-script)\nrpi_serial:build_lib runs the [rpi_serial/bin/build_lib.dart](bin/build_lib.dart)\nprogram which in turn calls the [build_lib](lib/src/native/build_lib) script\nto compile the native librpi_serial_ext.so library for the rpi_serial package.\n\n## Connecting\n\nRefer to [Raspberry Pi GPIO](https://www.raspberrypi.org/documentation/usage/gpio/) for connecting your serial device to the Raspberry Pi.\nBy default pins 8 is TX and 10 is RX on the GPIO header.\n\nNote that the Raspberry Pi actually has two UARTs.\nOn the versions with Bluetooth (Raspberry Pi 3 and Raspberry Pi Zero W), the UART exposed to the GPIO pins is __\"/dev/ttyS0\"__, while it is __\"/dev/ttyAMA0\"__ on the rest of the boards.\nThis can be changed (see [Rapsberry Pi UART configuration](https://www.raspberrypi.org/documentation/configuration/uart.md)).\nOn the compute module, you can supposedly expose both serial interfaces on the GPIO.\n\n## Examples\n\n[basic_device](example/basic_device.dart) is a class containing most of the basic features that you would need to comunicate with a serial device. This is implemented using the API ([__Serial__](lib/serial.dart)). No low-level interactions required. If you want to communicate with another device, you should probably create a similar class, but specific to that device.\n\n[example](example/example.dart) is for demonstrating basic read and write operations using the [basic_device](example/basic_device.dart) class.\n\nHopefully the examples are pretty self-explanatory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinicentus%2Frpi_serial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinicentus%2Frpi_serial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinicentus%2Frpi_serial/lists"}