We have released RumiCar-lib v0.7.1. The release notes below are also available on GitHub.
What’s new
- The sketches and the documentation now handle
RC_read()values in one order. First check whether a value is 0 or more (a distance) or negative (a status), and handle all statuses in one block.-1(no answer) → stop.-3(out of range) means that nothing was measured before the limit. To compare-3as “far”, replace it with a constantFAR_MM(9999) — for comparisons only, never in a left/right difference. The limit is a constantLIMIT_MMat the top of the sketch, passed asRC_setReadLimit(LIMIT_MM)insetup(). Exercise-3.3is rewritten to steer by situation, without made-up distances: walls on both sides → drive in the middle; a wall on one side only → move away from it; no wall → go straight; a sensor does not answer → stop. The steering strength still adjusts itself (half when the car swings past the target, 1.3 times when the error does not get smaller, 40–255), and it is not judged in the loop where the situation changed, for example when a pole appears or a wall ends.Exercise-4.2-Answerstops when a sensor does not answer (-1) instead of treating it as far. Otherwise it drives exactly as in v0.7.0.AGENTS.md(Exercise-4.1 / 4.2) and the README describe the same order,LIMIT_MMandFAR_MM.
Compatibility
- The library itself is unchanged:
src/andkeywords.txtare the same as in v0.7.0, and so are the API and the return values ofRC_read(). Your own sketches work as before. Exercise-3.3drives differently from v0.7.0 when a sensor does not answer and when walls appear or disappear. In the RumiCar Simulator v12.0.0 (tabletop courses, six car types, the same values for every car) it finished about as often as v0.7.0.Exercise-4.2-Answerchanges only when a sensor times out.
Notes
- The same rules are coming to the Raspberry Pi sample programs, the RumiCar Simulator samples and the hands-on text.
- Please report problems as Issues.
Dependencies
- VL53L0X (Pololu) — installed automatically by Library Manager.
Supported platforms
- Arduino AVR, ESP32, Spresense, Raspberry Pi Pico W
