Skip to content

0.2.0 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Feb 16, 2024
Merged

0.2.0 #9

merged 27 commits into from
Feb 16, 2024

Conversation

gbr1
Copy link
Member

@gbr1 gbr1 commented Feb 16, 2024

Release notes 0.2.0

Now all methods, set and get data in centimeters, you can change units by passing the unit parameters,

Available units are (first is default):

  • distances: cm, mm, m, inch
  • angles: deg, rad, %, rev
  • linear velocities: cm/s, mm/s, m/s, inch/s, %
  • angular velocities: deg/s, rad/s, %, rev/s, rpm (note: wheel speed default is in RPM)

Fixs:

  • improved communication parser
  • improved UART baud rate



New methods available:

  • brake, stops motors
  • get_color(<format>), return normalized color if format = 'rgb' or hsv values if format = 'hsv'
  • get_color_label(<h>, <s>, <v>), return the string label of the detected color, such as 'red'
  • color_calibration(<white/black>), pass 'white' or 'black' to calibrate upper or lower limit
  • get_distance_top(<unit>), return distance above the robot in centimeters, use unit to change the unit
  • get_distance_bottom(<unit>), return distance in the bottom part of robot in centimeters, use unit to change the unit
  • set_behaviour(<behaviour>), set internal behaviours, at the moment 0 disable and 1 automatically turn off the illuminator when you lift the robot
  • set_wheels_position(<left>, <right>, <unit = 'deg'>), set position of both wheels
  • get_wheels_position(<left>, <right>, <unit = 'deg'>), get position of both wheels
  • get_drive_speed(<linear_unit = 'cm/s'>, <angular_unit = 'deg/s'>), get drive speed

Introducing color calibration, how to

Generally default parameters could give you issues, so it is suggested to calibrate your sensor.
You need a white surface and a black surface.

Connect your robot to Labs for Micropython and type in REPL terminal:

>>> from arduino_alvik import ArduinoAlvik

>>> alvik = ArduinoAlvik()

>>> alvik.begin()

Now place your robot on the white surface and type:

>>> alvik.color_calibration('white')

Now place your robot on the black surface and type:

>>> alvik.color_calibration('black')

Press reset on Lab for Micropython.

You can now test using read_color_sensor.py in examples folder.

colors are tested on paper painted using acrilic marker pens, such as UNIPOSCA, or paper printed with an inkjet printer

eigen-value and others added 27 commits February 7, 2024 18:18
mod: sleep 2s after receiving ack from robot
doc: conversions.py out types
example: test_meas_units.py
feat: convert_rotational_speed added %rpm and rev/s
get_distance_bottom
fix: get methods using conversions must always return floats
mod: increased uart baud
@gbr1 gbr1 merged commit 04f498a into main Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants