ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
<re_irc> <aja23> it looks like my issues with macro expansion are a rust-analyzer issue, I finally worked through all the actual compilation errors and now cargo build completes successfully
IlPalazzo-ojiisa has joined #rust-embedded
starblue has quit [Ping timeout: 255 seconds]
starblue has joined #rust-embedded
emerent has quit [Ping timeout: 256 seconds]
emerent has joined #rust-embedded
<re_irc> <henrik_alser> : How’s the podcast coming along?
<re_irc> < (@dkhayes117:matrix.org)> Pretty good. It took me a while to get my recording equipment working like I wanted on Linux (pop_os). I've had some people already interested in being a guest. Right now I'm trying to figure out the best format/cadence. I was thinking of keeping the podcasts more conceptual then following up with a companion youtube video for concrete examples were applicable.
<re_irc> < (@dkhayes117:matrix.org)> * where
<re_irc> <denbo1977> Hi guys, I'm trying to create a heapless::String from a [u8;200], however the heapless::String.from_utf8 method seems to have been removed in the latest version.
<re_irc> Any ideas?
<re_irc> < (@jamesmunns:beeper.com)> You might need to call "core::str::from_utf8" yourself first? Does it still have a "from_str" method?
<re_irc> <denbo1977> Works perfectly, thank you so much!
<re_irc> < (@dkhayes117:matrix.org)> henrik_alser:
<re_irc> Pretty good. It took me a while to get my recording equipment working like I wanted on Linux (pop_os). I've had some people already interested in being a guest. Right now I'm trying to figure out the best format/cadence. I was thinking of keeping the podcasts more conceptual then following up with a companion youtube video for concrete examples where applicable.
<re_irc> <Félix the Newbie> I'm sorry, I've asked the question already, but I haven't got a definitive answer. In my keyboard matrix, the columns are the output, and the rows the input. I think there are diodes to prevent ghosting. Can I reverse the things, like the rows are the output, and the columns the input? That question interests me because I want to better understand how it works internally.
<re_irc> I've tried to reverse things in my code: columns pins use "into_pull_up_input" and rows "into_open_drain_output", but it doesn't work. Maybe there is an alternative way with another mode?
<re_irc> <|cos|> This appears to be the commit removing from_utf8, motivating it by it being in core: https://github.com/japaric/heapless/commit/12682bd
<re_irc> <denbo1977> Cool thx, that makes sense!
<re_irc> < (@jamesmunns:beeper.com)> Félix the Newbie: No, if the diodes are set one way, you will always need to use the row/columns in that direction
<re_irc> < (@jamesmunns:beeper.com)> also, not the difference between "open_drain" and "push_pull" outputs:
<re_irc> In push-pull, your outputs will be "false => 0v", "true => 3.3v". In open-drain, your outputs will be "false => 0v", "true => (open circuit)".
<re_irc> < (@jamesmunns:beeper.com)> * note
<re_irc> < (@jamesmunns:beeper.com)> open_drain is used for cases like I2C, where the line is pulled high (for everyone), and when one node wants to signal a "0", it pulls the whole line down.
<re_irc> < (@jamesmunns:beeper.com)> push-pull wouldn't work in this case, as one node would be "pushing" high to 3.3v, while one node is "draining/pulling" down to 0v, which then acts like a short-circuit between 3.3v and 0v ground.
<re_irc> < (@jamesmunns:beeper.com)> Félix the Newbie ^
<re_irc> <gray_philip> Hi 👋
<re_irc> Most people would love
<re_irc> working from home...
<re_irc> to get started online
<re_irc> < (@burrbull:matrix.org)> : spam
<re_irc> <sashin> Hi everyone!
<re_irc> <sashin> Is this chatroom active?
<re_irc> <Félix the Newbie> : Thanks a lot for the explanation :)$
<re_irc> <Félix the Newbie> * :)
<re_irc> <Félix the Newbie> My scan function looks like that:
<re_irc> let mut state = [[false; 7]; 6];
<re_irc> for (j, col) in self.cols.iter().into_iter().enumerate() {
<re_irc> pub fn scan(&mut self) -> KeyState {
IlPalazzo-ojiisa has quit [Remote host closed the connection]
<re_irc> <Félix the Newbie> : If I keep columns=output and rows=input, but I replace open drain with push-pull, it still works (I change nothing else). Furthermore, it works with a way lower delay. Looks like it's faster to switch voltage that opening/closing the circuit.
<re_irc> < (@jamesmunns:beeper.com)> That makes sense, the MCU can drive more current (10mA?) than a typical 10k+ pull-up resistor (<100uA)
<re_irc> < (@jamesmunns:beeper.com)> So the rise time would be faster
<re_irc> <Félix the Newbie> But why is it the same thing to use those 2 differents output modes in my case?
<re_irc> <Félix the Newbie> output: open drain → intput: pull up
<re_irc> vs
<re_irc> output: push-pull → input: pull up
<re_irc> < (@jamesmunns:beeper.com)> If there are pull-up resistors on the board, it will still work with the MCU pin open circuit, just it takes longer to register the pin as high after releasing the drain
<re_irc> <Félix the Newbie> Never mind, I don't understand enough about the electric side of things (yet) to get what you say… I really need to read a book about that.
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded