Forum Update - Announcement about May 10th, 2018 update and your password.

Scribbler S3 how to set calibration values in EEPROM

I see from the S3 firmware (.spin) that there are a few calibration values:
  DEFAULT_FULL_CIRCLE   = 955
  DEFAULT_WHEEL_SPACE   = 153
  DEFAULT_LIGHT_SCALE   = 0
  DEFAULT_LINE_THLD     = 32
  DEFAULT_OBSTACLE_THLD = 1

and that the firmware will use values stored in EEPROM if there are "reasonable" values at the proper address. I see a systematic bias in turning (maybe also distance), and I would like to adjust the 5 bytes of wheel calibration data.

What tool can I use to write to the S3 EEPROM? Any chance I can get BlocklyProp to do it?


Comments

  • 5 Comments sorted by Date Added Votes
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 21,968
    edited May 21 Vote Up0Vote Down
    You can use the method set_wheel_calibration to set values that are different from the default constants for full_circle and wheel_space. Once you're satisfied with the new values, do it again and then, without resetting or power-cycling, call write_wheel_calibration to store the new values in EEPROM.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • Thank you for the help. I was able to adjust the full_circle parameter to get more accurate turns. It looks like these calibration parameters are a bit redundant and not complete. For example, if I wanted to calibrate linear distance traveled, is there any of these two calibration constants I could modify?
  • The assumption behind the distance calibration is that all of the wheel diameters are the same, so there's no setting for that. However, I do understand that rubber tires can affect their true value. For straight-line movements, you can always scale the motion parameters to correct for any inaccuracies. Read up on the ** operator; it will be your friend here.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • WhitWhit Posts: 3,931
    edited May 25 Vote Up0Vote Down
    @gugagore - Saw this and your other post about "BlocklyProp upload user program with custom firmware to Scribbler S3" I assume these two threads are related.

    Check out this feature in BlocklyProp (S3 board setting). The default values can be reset using this method and should remain unchanged. When I have some time - I will research the addresses and check this out further. The S3 with BlocklyProp is really running in C now and the default program is not even C, but a lower language.

    Memory.JPG
    477 x 487 - 35K
    Whit+

    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Whit- the EEPROM blocks won't allow users to get into the settings area of the EEPROM, but it wouldn't be too difficult to create a block that lets you tweak those settings. I'll add this in as a block request in github.
    Matthew Matz
    STEM/Robotics Educator
    Parallax Inc.
Sign In or Register to comment.