Upgrade to Pro — share decks privately, control downloads, hide ads and more …

STMとROSをシリアル通信させて移動ロボットを作る

Avatar for Morishita Masanari Morishita Masanari
March 09, 2025
7

 STMとROSをシリアル通信させて移動ロボットを作る

Avatar for Morishita Masanari

Morishita Masanari

March 09, 2025
Tweet

Transcript

  1. 16bitを8bit×2に分割 memcpy関数を使って,int16_tをchar二つに分割 0 0 0 0 0 0 0 0

    0 1 1 0 0 1 0 0 char[0] char[1] 例えば 100=0b00000000 01100100 を送りたい時
  2. なぜか10を送ると,13 10になる 0 0 0 0 1 0 1 0

    10cm/sを送ろうとした時 10 0x0a 0 0 0 0 1 1 0 1 13 10 0x0d 0 0 0 0 1 0 1 0 0x0a