KickCAT icon indicating copy to clipboard operation
KickCAT copied to clipboard

read accel data and fill dataframe

Open trns1997 opened this issue 2 months ago • 2 comments

Closes #221

  • [x] Fill the RxPDOs (0x6000–0x6005) with current accelerometer and magnetometer values (accel_x, accel_y, accel_z, mag_x, mag_y, mag_z) so the master can read them.
  • [x] Read the TxPDOs (0x7000–0x7002) to get the LED states (LED_R, LED_G, LED_B) and update the physical LEDs accordingly.

Need to wait the following 2 PR from nuttx to be merged:

  • https://github.com/apache/nuttx/pull/17150
  • https://github.com/apache/nuttx/pull/17152

Test it yourself

Build slave bin

cd KickCAT

cp examples/slave/nuttx/lan9252/freedom-k64f/board/defconfig ~/nuttxspace/nuttx/boards/arm/kinetis/freedom-k64f/configs/kickcat

~/nuttxspace/nuttx/tools/configure.sh -l -E freedom-k64f:kickcat && make export -C ~/nuttxspace/nuttx -j8

mkdir -p build_slave && cd build_slave && cp ../../nuttxspace/nuttx/nuttx-export-12.11.0.tar.gz ./ && tar -xzf nuttx-export-12.11.0.tar.gz && cmake .. -DCMAKE_TOOLCHAIN_FILE=nuttx-export-12.11.0/scripts/toolchain.cmake && make && ../examples/slave/nuttx/lan9252/freedom-k64f/board/deploy.sh easycat_frdm_k64f.bin

Build master

cd KickCAT
mkdir -p build && cd build && cmake .. && make -j8

Run

Connect the slave with master via ethernet

sudo examples/master/freedom-k64f/freedom_k64f_example enp8s0

trns1997 avatar Oct 02 '25 06:10 trns1997

@leducp i think i will update the build_NuttX CI to use the latest nuttx bins, unless there is a particular reason to stay on an older version?

trns1997 avatar Nov 14 '25 10:11 trns1997

@leducp i think i will update the build_NuttX CI to use the latest nuttx bins, unless there is a particular reason to stay on an older version?

I think this is a great idea :)

leducp avatar Nov 14 '25 12:11 leducp