List of programming functions

Damerino Basic programming language is divided into two main types, the random mode (blue) and the sequential mode (green). We recommend that you also consult the programming examples.

Random mode

  1. q
    Catch a question
  2. a
    Gives an answer
  3. am
    Makes a facial expression
  4. ao
    Opens a file and runs it
  5. note
    Add a comment

Sequential mode

  1. say
    Speaks
  2. sayb
    Speaks and wait for the button to be pressed to proceed
  3. note
    Add a comment
  4. pause
    Pauses the program and wait for the button to be pressed
  5. sleep
    Pauses the program for the specified seconds
  6. mood
    Makes a facial expression
  7. randeyes
    Moves his eyes randomly (sometimes even his eyebrows)
  8. listen
    Runs speech recognition and waits for an input
  9. save
    Save data received from various channels
  10. set
    Set a variable
  11. […]
    Treat a word as a variable
  12. sum
    Makes sums and subtractions
  13. product
    Makes multiplication
  14. rand
    Generates a random number
  15. cloud
    Connects to remote services
  16. language
    Sets Damerino language
  17. rate
    Set the speed of Damerino speech
  18. standby
    Sets Damerino servomotors to Standby position.
  19. move
    Moves the servomotors directly
  20. camera
    Activates the camera
  21. tracking
    Activates face tracking
  22. takepicture
    Takes a picture
  23. manual
    Allows a manual control of the answers provided by the interlocutor
  24. open
    Opens a file and runs it
  25. raw
    Allows to send firmware commands directly
  26. Le lezioni
    Programming mode with questions and related corrections
  27. yes
    Feedback in case of correct answer (only for lessons)
  28. not
    Feedback in case of wrong answer (for lessons only)

Control structures (sequential mode)

  1. do…repeat
    Cycle
  2. do…while
    Cycle with condition
  3. repetitions
    Set the number of times Damerino needs to ask a question in the case of a wrong answer (for lessons only)
  4. if
    “if” condition
  5. elseif
    “elseif” condition
  6. else
    “else” condition
  7. and
    Adds rows to a condition

Comparison operators (sequential mode)

  1. =
    Equal
  2. !=
    Not equal
  3. <
    less than
  4. >
    greater than

Other operators (random and sequential mode)

  1. #
    Alternative phrases
  2. |
    Alternative words
  3. *
    Any other word or letter

Constants (sequential mode)

  1. $smile
    Contains the probability of smile of the interlocutor
  2. $face
    Indicates if there is a face in front of Damerino
  3. $xface
    Contains the x coordinate of the face in front of Damerino
  4. $yface
    Contains the y coordinate of the face in front of Damerino
  5. $heightface
    Contains the height of the face in front of Damerino
  6. $widthface
    Contains the width of the face in front of Damerino
  7. $eyes
    Contains the probability that the eyes of the interlocutor are closed
  8. $righteye
    Contains the probability that the right eye of the interlocutor is closed
  9. $lefteye
    Contains the probability that the left eye of the interlocutor is closed

Input/Output (sequential mode)

  1. write
    Writes on the digital outputs (including the pwm control for additional servomotors)
  2. read
    Reads the analog inputs