Building Embedded Systems With Rust

Поділитися
Вставка
  • Опубліковано 18 лис 2024

КОМЕНТАРІ • 54

  • @austinjohnson7421
    @austinjohnson7421 Рік тому +117

    Who knew I'd find all my interests in a single video - skateboarding, beer, pizza, embedded programming, and now rust. 💯

  • @wrong1029
    @wrong1029 Рік тому +11

    19:56 i work at a large rust shop and we just call it 'and mut' casually and 'mutable reference' formally.
    Great talk also, really comprehensive. It's awesome how first class embedded programming is in rust despite being so high level.

  • @itssoaztek4592
    @itssoaztek4592 Рік тому +11

    Just a comment regarding prices for keycaps mentioned at 5:15 , yes, the plastic for injection-molded parts is dirt cheap but the tooling for injection-molding is freaking expensive. So the price for keycaps is strongly dependent on scale of production because the cost for tooling is basically the same for very small and very large production runs (assuming you limit the upper bound to the threshold at which the tooling has to be exchanged due to excessive wear).

    • @brianschwind6530
      @brianschwind6530 Рік тому +2

      Right, the molds are the expensive part.
      I wanted to poke a bit of fun at the whole thing because from the outside, it looks insane to spend several hundred on some plastic when you can get very similar plastic for much cheaper.
      Though I'm curious if you know or not - can a manufacturer like GMK just re-use their molds assuming they're only changing colors and not legends?

    • @itssoaztek4592
      @itssoaztek4592 Рік тому +3

      @@brianschwind6530 Can't really answer that, my experience with injection-molding comes from a totally different industry. My uneducated guess would be there is a fair chance that you are right. However, there is a great variety of ways to formulate or modify injection-molding feedstock in order to change or adjust color. All of which potentially can alter flow and temperature dependent properties of the feedstock which may or may not result in having to redesign tooling.

  • @spaghetticode3107
    @spaghetticode3107 Рік тому +7

    I wonder if there was a talk about Tokio at the Tokyo meetup

  • @L4Ph
    @L4Ph Рік тому +8

    I was interested in Rust, so I opened this video at random and found my built keyboard lol.
    JP60(Oilking+EPBT Dolch Blue), KBD75, etc.
    I was only working at Yushakobo until 3/30.
    I worked there for about 2 years, but I never thought I would see my keyboard in such a famous international community lol.

    • @hovesssharedspace8490
      @hovesssharedspace8490 Рік тому +2

      nerds attract nerds

    • @brianschwind6530
      @brianschwind6530 Рік тому +3

      Wow.
      Your keyboard started all this, I hope you know. I wasn't that into the other keyboards in the store until I tried yours. I probably didn't convey it well in the video, but I _loved_ typing on the one you made.
      Do you still have it? I'd love to chat more and hear how it was to work at Yushakobo.

  • @Tim_Small
    @Tim_Small Рік тому +4

    50:52 I would recommend Nordic Semiconductor nrf52 chips for Rust and Bluetooth instead. Better radios, longer battery life, better Rust support, better software Bluetooth stack too. The chip used in the "Raspberry Pi Pico-W" is an alternative, but probably best to stick to Nordic.

    • @brianschwind6530
      @brianschwind6530 Рік тому +1

      Just purchased an nRF52840 dev board for testing out embassy-rs :)

    • @ntn888
      @ntn888 Рік тому

      Hi you mentioned Bluetooth stack for the nrf52... do know of a stack for the plain HAL instead of using embassy? thanks.

  • @hz8711
    @hz8711 Рік тому +3

    it will be nice if you add some audio filtering like background noise reduction

  • @h_pranav_nayak
    @h_pranav_nayak Рік тому +7

    Very informative video. Thanks for sharing this

  • @ethanholz3733
    @ethanholz3733 Рік тому +2

    This is a really cool presentation! Thanks!

  • @kennethbeal
    @kennethbeal Рік тому

    Thank you, great presentation, excellent technical knowledge.

  • @reymicroc
    @reymicroc Рік тому +1

    why is it necessary again to write a keyboard driver? Is this feature not already included on the system?

    • @brianschwind6530
      @brianschwind6530 Рік тому +2

      A full system using a keyboard has two parts - the keyboard and its associated electronics (the USB device), and the computer it is connected to (the USB host).
      The keyboard contains the firmware required to read keys and communicate over USB to tell the computer which keys are pressed.
      The computer contains the driver which is like the receiving half of the USB connection. Both are necessary for everything to work as expected.
      In this talk I only went over the firmware side of things - I use Mac and Linux and I didn't write the host-side drivers, they are indeed built into the system as you said.

  • @Sculas
    @Sculas Рік тому +7

    Very interesting talk! I was curious though; in your code, you delay for 1 ms so you have a polling rate of 1000 Hz. I watched a video not too long ago about timing from Ben Eater, where he mentioned that he also needs to account for the time it takes to run his own code, besides the time needing to wait. Isn't that the case here too? If you don't account for the time it takes to run your own code and just flat out wait 1 ms, won't the polling rate fluctuate/differ? Or is the time it takes to run your keyscan so minimal that it doesn't matter? I don't know if a fluctuating polling rate even matters (still learning embedded systems), but it's just a thought that sprung up in my mind!

    • @tissuepaper9962
      @tissuepaper9962 Рік тому +5

      The "correct" way to write such code is to use a hardware timer for the waiting, and have that timer invoke an interrupt which scans the keys.

    • @brianschwind6530
      @brianschwind6530 Рік тому +5

      Yep, this is quite a naive way to write the firmware. It _works_ so I haven't dived into making it more correct, but you're right that you should account for the time it takes to execute your own code.
      There are actually still some quirks with the USB HID behavior I need to iron out, so the issue you mentioned may possibly be contributing to some bad behavior.
      Thanks for watching!

  • @pppkenken6610
    @pppkenken6610 Рік тому

    Now and then pop-up RUST.

  • @ttv_tej
    @ttv_tej Рік тому +2

    how can I join the community?

  • @jurgenblick5491
    @jurgenblick5491 Рік тому +1

    I see potential

  • @wickeddubz
    @wickeddubz 7 місяців тому

    Atmega32u4 is very popular for making USB HID devices. RP2040 is very cheap, but for keyboard it’s overkill

    • @brianschwind6530
      @brianschwind6530 7 місяців тому +2

      Yep the Atmega32u4 has been popular for quite awhile, and that's a totally valid chip to build on top of for what I made.
      I chose the RP2040 because:
      * It's cheap, as you said
      * It's currently easy to acquire
      * Stable Rust toolchains support it well
      * The PIO peripheral is interesting for things like custom communication protocols, or supporting RGB LEDs (not saying the Atmega32u4 _can't_ do that though)
      I'm okay with selecting the overkill option if it's cheaper, all other things being equal.

  • @emvdl
    @emvdl Рік тому +1

    Thank you 👍

  • @BareTuna
    @BareTuna 6 місяців тому

    You mention the high price of a keyboard kit. How much money did you save in total this way?

    • @brianschwind6530
      @brianschwind6530 5 місяців тому +2

      Looking back at one of my orders, I spent 15317 yen + 3614 shipping for:
      * 5 PCBs
      * 5 Top Plates
      * 5 Bottom Plates
      * PCB Parts + Assembly
      That's 18,931 yen total, which is 3786 yen per board, or around $25 per board.
      But then you need to buy switches (let's say 4000 yen for 75), keycaps (as little as 2000 yen up to 12000 yen or more), and stabilizers (~2500 yen). So that's around another 10,000 yen in parts, bringing us to a grand total of around $90 for a completed keyboard. It can go higher or lower depending on the parts.
      A keyboard I saw that I wanted in the store was around 50,000 yen I believe, so in raw prices that's a good amount of savings. Of course, if you factored in the time I spent making my own, I don't come out ahead at all but that would be _boring_. And then of course I ordered multiple iterations as I changed things, and the minimum order quantity is 5, but I gave away a lot of boards to friends. I think it all worked out nicely in the end and I learned a lot along the way.

    • @BareTuna
      @BareTuna 5 місяців тому

      @brianschwind6530 Awesome! Thank you for the lovely breakdown. Even if it were more expensive, I feel that making something yourself offsets the cost, just in a different way ;)
      Those prices are pretty encouraging. Maybe I'll give it a shot sometime! (My idea was to make some macropads)

    • @brianschwind6530
      @brianschwind6530 5 місяців тому +1

      @@BareTuna Absolutely go for it! It's very satisfying to make your own tools, and building a custom keyboard or macropad is very approachable. A macropad especially will turn out quite cheap.

  • @RoyMustang.
    @RoyMustang. Рік тому

    Best ones 💯

  • @Aw4yed
    @Aw4yed Рік тому

    so Im not the only one to print everywhere is needed "lol" xD

    • @brianschwind6530
      @brianschwind6530 Рік тому +3

      That's always a classic, though when I'm not presenting it's usually a bit more profanity.

  • @RubiKeys
    @RubiKeys Рік тому

    so you went highschool with hippo i see hehe, that's a small world after all

    • @brianschwind6530
      @brianschwind6530 Рік тому

      Ah, no I just cherry-picked images from the mechanical keyboard subreddit :)

  • @sonopro1
    @sonopro1 Рік тому

    The real goal should be to fight against the exclusive access of the richest to digital tools (digital divide).
    Then, it is to give back the control to the rest, that is to say to the 99% of the people who are not able to follow $$$$.
    So, those who publicly want to be part of this domination of the people again, I propose you the following statement....
    We are more powerful together and this without restriction of being different.

  • @ivanh2674
    @ivanh2674 Рік тому +1

    goolang the best

  • @fjs1111
    @fjs1111 Рік тому

    I would go to this meetup simply to try and meet that girl in the back... lol

    • @Manhunternew
      @Manhunternew 9 місяців тому +1

      Well go to any meetup there will be girls, then speak with them

  • @SquidgyTTV
    @SquidgyTTV Рік тому +1

    Thought red stone came to rust or some shit

  • @animal-lover--
    @animal-lover-- Рік тому

    this reminds me a lot of the early days of remilio baby nft. also i forgive you all for wearing masks. sincerley yayo remilia corp yayo

  • @viktable5955
    @viktable5955 Рік тому +1

    are you sure you checked none of participants were carrying any handguns? otherwise it was illegal meeting under CoC of Rust!! No need to troon out into Rust, just learn safe C/C++ variants.