{"id":16140840,"url":"https://github.com/ellerbach/brickpi","last_synced_at":"2026-03-17T00:32:56.904Z","repository":{"id":83065901,"uuid":"51786713","full_name":"Ellerbach/BrickPi","owner":"Ellerbach","description":"Windows 10 IoT Core implementation for the excellent BrickPi from Dexter Industries running on RaspberryPi 2","archived":false,"fork":false,"pushed_at":"2016-06-22T14:38:47.000Z","size":160,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-20T08:00:21.231Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ellerbach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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,"zenodo":null}},"created_at":"2016-02-15T21:23:10.000Z","updated_at":"2024-02-09T14:15:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"742d14ec-20f0-4f70-9f66-365b49e28ca9","html_url":"https://github.com/Ellerbach/BrickPi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ellerbach/BrickPi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ellerbach%2FBrickPi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ellerbach%2FBrickPi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ellerbach%2FBrickPi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ellerbach%2FBrickPi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ellerbach","download_url":"https://codeload.github.com/Ellerbach/BrickPi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ellerbach%2FBrickPi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267491204,"owners_count":24096148,"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-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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-09T23:53:55.227Z","updated_at":"2026-03-17T00:32:51.852Z","avatar_url":"https://github.com/Ellerbach.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BrickPi\nWindows 10 IoT Core implementation for the excellent BrickPi from Dexter Industries running on RaspberryPi 2. \n\n## Setup the RaspberryPi running Windows 10 IoT Core\nIn early release of Windows 10 IoT Core, the high speed onboard serial is not supported. You need to manually change the device registry to enable the highspeed serial. Note as well that the code has been optimized to work even if the high speed serial is not fully supported. So once activated, it should just work. New drivers have/will be released for coming version which will be directly supported.\n```CMD\nReg add hklm\\system\\controlset001\\services\\serpl011\\parameters /v MaxBaudRateNoDmaBPS /t REG_DWORD /d 921600\nDevcon restart acpi\\bcm2837\n```\n\n## Setup of the project\nYou'll have to make sure you edit the Package.appxmanifest file in your project to add the serial port capability:\n\n```XML\n  \u003cCapabilities\u003e\n    \u003cCapability Name=\"internetClient\" /\u003e\n    \u003cDeviceCapability Name=\"serialcommunication\"\u003e\n      \u003cDevice Id=\"any\"\u003e\n        \u003cFunction Type=\"name:serialPort\" /\u003e\n      \u003c/Device\u003e\n    \u003c/DeviceCapability\u003e\n  \u003c/Capabilities\u003e\n```\n\nThen, you'll need a to reference the BickPi project to your project, add the missing using, create a private Brick class, initialize the class and pass the serial port to the Brick\n\n```C#\nprivate Brick brick = null;\nprivate SerialDevice serialPort = null;\n\nprivate async Task InitSerial()\n{\n    string aqs = SerialDevice.GetDeviceSelector();\n    var dis = await DeviceInformation.FindAllAsync(aqs);\n    for (int i = 0; i \u003c dis.Count; i++)\n    {\n        Debug.WriteLine(string.Format(\"Serial device found: {0}\", dis[i].Id));\n        if (dis[i].Id.IndexOf(\"UART0\") != -1)\n        {\n            serialPort = await SerialDevice.FromIdAsync(dis[i].Id);\n        }\n    }\n    if (serialPort != null)\n    {\n        Debug.WriteLine(\"Serial port initialiazed\");\n        brick = new Brick(serialPort);\n        Debug.WriteLine(\"Brick initialiazed\");\n    }\n}\n\n  private async void MainPage_Loaded(object sender, RoutedEventArgs e)\n  {\n      await InitSerial();\n      // You are ready now!\n  }\n```\n  \n## Using the Sensor classes\nUsing the sensor classes is straicht forward. Just reference a class and initialized it. Access properties and function. The ReadRaw(), ReadAsString() functions are common to all sensors, Value and ValueAsString properties as well. \nA changed property event on the properties is raised with a minimum period you can determined when creating the object or later if the property has changed. That make your life easier if you're building XAML UI and want to use property binding directly in your code.\nExample creating a NXT Touch Sensor:\n```C#\nNXTTouchSensor touch = new NXTTouchSensor(BrickPortSensor.PORT_S2);\nDebug.WriteLine(string.Format(\"Raw: {0}, ReadASString: {1}, IsPressed: {2}, NumberNodes: {3}, SensorName: {4}\", touch.ReadRaw(), touch.ReadAsString(), touch.IsPressed(), touch.NumberOfModes(), touch.GetSensorName()));\n```\nThis will create an EV3 Touch Sensor on port S1 and will tell it to check changes in properties every 20 milliseconds.\n```C#\nEV3TouchSensor ev3Touch = new EV3TouchSensor(BrickPortSensor.PORT_S1, 20);\n```\n\nMore documentatin to come on sensors\n\n## Using Motors\nMotors are as well really easy to use. You have functions Start(), Stop(), SetSpeed(speed) and GetSpeed() which as you can expect will start, stop, change the speed and give you the current speed. A speed property is available as well and will change the speed. \nLego motors have an encoder which gives you the position in 0.5 degree precision. You can get access thru function GetTachoCount(). As the numbers can get big quite fast, you can reset this counter by using SetTachoCount(newnumber). A TachoCount property is available as well. This property like for sensors can raise an event on a minimum time base you can setup. This is usefull if you're binding this value to a XAML UI for example.\n\n```C#\nMotor motor = new Motor(BrickPortMotor.PORT_D);\nmotor.SetSpeed(100); //speed goes from -255 to +255\nmotor.Start();\nmotor.SetSpeed(motor.GetSpeed() + 10);\nDebug.WriteLine(string.Format(\"Encoder: {0}\", motor.GetTachoCount()));\nDebug.WriteLine(string.Format(\"Encoder: {0}\", motor.TachoCount)); //same as previous line\nDebug.WriteLine(string.Format(\"Speed: {0}\", motor.GetSpeed()));\nDebug.WriteLine(string.Format(\"Speed: {0}\", motor.Speed)); //same as previous line\nmotor.SetPolarity(Polarity.OppositeDirection); // change the direction\nmotor.Stop();\n```\nMore documentation on motors to come\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellerbach%2Fbrickpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fellerbach%2Fbrickpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fellerbach%2Fbrickpi/lists"}