Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while( true ) {
- // wait for next measurement and receive it
- int32_t force = receive_measurement();
- // get timestamp and motor position
- uint32_t timestamp = timestamp_cycles();
- uint32_t position = *position_var;
- // ... control algorithm goes here ...
- send_message( ++id, timestamp, force, position );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement