David Andersen on Nostr: Ok, I know I'm a bit of a #rust fan, but this is really winning me over more. For ...
Ok, I know I'm a bit of a #rust fan, but this is really winning me over more. For startup reasons, wanted to familiarize myself with basic functionality of the rp2040. Used it as an excuse to check out rust async + embedded using Embassy, and .. my goodness, it's delightful. This code snippet waits for the PIR motion sensor to trigger and updates some global state. Simple, but:
It's handling all of the awkward rp2040 interrupt configuration automagically. You just "wait". It does it all. Love!
Published at
2023-08-10 20:48:35Event JSON
{
"id": "edd4b5dea72d9450f412df773654522a53eac73429ff17f812c349dc36e6854c",
"pubkey": "1afb68f48879864f0605c56d13bcabfc6ca4e02cfec9292c7c46e76dce02aaef",
"created_at": 1691700515,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"proxy",
"https://hachyderm.io/users/dave_andersen/statuses/110867285012238703",
"activitypub"
]
],
"content": "Ok, I know I'm a bit of a #rust fan, but this is really winning me over more. For startup reasons, wanted to familiarize myself with basic functionality of the rp2040. Used it as an excuse to check out rust async + embedded using Embassy, and .. my goodness, it's delightful. This code snippet waits for the PIR motion sensor to trigger and updates some global state. Simple, but:\n\nIt's handling all of the awkward rp2040 interrupt configuration automagically. You just \"wait\". It does it all. Love!\n\nhttps://media.hachyderm.io/media_attachments/files/110/867/281/698/611/427/original/2a66b9aedef31193.png",
"sig": "d2d0b22853b0c387cd361cdf476ec90723aba0c4c3735479d75d964eff13e4dda64a16c28cd191cd89706c2bd969280c1018c543acb27e798307901173848fc8"
}