GithubHelp home page GithubHelp logo

knurling-rs / knurling-session-20q4 Goto Github PK

View Code? Open in Web Editor NEW
22.0 10.0 9.0 8.88 MB

Building your own embedded CO2 measuring device. With Rust!

Home Page: https://session20q4.ferrous-systems.com/

Rust 100.00%
embedded rust

knurling-session-20q4's Introduction

Knurling Session 2020 Q4

This repo contains the source for the first knurling session as well as the example code.

About

This course will cover building a CO2 measuring device. We will show how to start an embedded program from scratch, how to write a driver for the sensor, and how to read the sensor output in a terminal. We will build a visual indicator for air quality and an acoustic alarm. In the last part, we will add an ePaper display to the setup and talk bit about the embedded-graphics crate.

Read it

You can access a rendered version at

session20q4.ferrous-systems.com

To build from source just run (assuming you have mdbook installed):

$ mdbook serve

Example code

Example code can be found in code/.

Contributing

Please open an issue if you get stuck or find anything to improve this book!

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as below, without any additional terms or conditions.

Support

The knurling sessions is part of the Knurling project, Ferrous Systems' effort at improving tooling used to develop for embedded systems.

If you think that our work is useful, consider sponsoring it via GitHub Sponsors.

License

Licensed under either of

at your option.

knurling-session-20q4's People

Contributors

briocheberlin avatar chevdor avatar dajamante avatar fujexo avatar japaric avatar joemclo avatar mirabellensaft avatar nkanderson avatar oddstr13 avatar spookyvision avatar urhengulas avatar xylakant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

knurling-session-20q4's Issues

It might be a good idea to include how to revert driver mod by Zadig

It requires a bit of an inconvenient investigation to find out the reason for Nordic nRF Command Line tools don't work after the driver was modified by Zadig.

The steps are:

  • Go to the Device Manager
  • Find the USB device named BULK Interface
  • Right click on it, select update driver
  • Select Browse my computers for drivers
  • Select Let me pick from a list of available drivers on my computer
  • The list will have "J-Link driver" select that and click Next.

Display flashing when updated

Hi knurling-rs team!

First off, thank you for making this tutorial. It was interesting, informative, and easy to follow.

At the end of the section on displaying sensor data, there's a mention that: "The display still flashes when it is updated, this and other more aesthetic issues will be addressed in the last update of this project, delivered in January."

Any word on resolving those issues or recommendations about how to stop the display flashing?

Thanks a lot

Wrong pin type for SCL and SDA on the SCD30 examples

The code in the SCD30 examples for declaring the SCL and SDA pins does not compile as is with the latest cargo packages. I am not completely sure if the hal version changed or not, but Twim::Pins require a floating input instead of a disconnected one.

That is:

pins.p0_30.into_floating_input().degrade();

Instead of:

pins.p0_30.degrade();

defmt issue when crate name starts with number

defmt does not work when the crate name starts with a number (e.g. 01_hello_extended.rs). I used the app template generator as suggested in the Knurling-session-20q4.

Dependencies used in Cargo.toml:

[dependencies]
nrf52840-hal = "0.15.1"
embedded-hal = "0.2.7"
cortex-m = "0.7.6"
cortex-m-rt = "0.7.1"
defmt = "0.3.2"
defmt-rtt = "0.3.2"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
nb = "1.0.0"
crc_all = "0.2.2"

Differet product id in the udev rule

Installation instructions say to add an udev rule with a ATTRS{idProduct}=="1015"

ATTRS{idVendor}=="1366", ATTRS{idProduct}=="1015", TAG+="uaccess"

However, this doesn't work for my nRF52840 Development because its product id is 1051

lsusb | grep SEGGER
Bus 002 Device 004: ID 1366:1051 SEGGER J-Link

So either there are development kits out there with different product ids, or 1015 is a typo. But seeing how consistent its use is throughout the book (and here knurling-rs/probe-run#220), it seems to me that there indeed must be devkits out there with different product ids?

In either case, imo, this should be reflected in the book (also in the other places that mention that id). I spent way too much time trying to figure out what's wrong, not seeing that the 1015 and 1051 values don't match.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.