OhbotUSA
  • OH
  • About
  • Buy
    • Buy Ohbot for Windows
    • Buy Ohbot Pi >
      • Ohbot Pi Assembled
      • Ohbot Pi Kit
    • Buy Picoh
  • Make
    • Assemble Ohbot Kit
    • Install software
    • Accessories
    • Technical Notes
    • Talk
    • Help
  • Program
    • Learn Ohbot
    • Code snippets
    • Projects
    • Block Glossary
    • Ohbiverse
  • Contact

Code Snippets

It's time for that 'Hello World' moment with your Ohbot! Here are a collection of code snippets you can try, tinker and combine to make Ohbot do new things. 
Try this test program to check your Ohbot is working properly.
Make Ohbot change its position by a set amount each time a key is pressed.
Make Ohbot move to particular position when a key is pressed.
Repeat a sequence of instructions to make Ohbot look scared.
create a sequence of movements to make Ohbot nod and shake.
Use the random block to make Ohbot blink at random intervals.
Set the speed of Ohbot's movements. Nod to sleep slowly and wake up quickly.
Repeatedly set the position of one of Ohbot's motors to the position of the mouse to turn Ohbot into a puppet.
Make Ohbot's lips move as it speaks by repeatedly setting the positions of the lips to the speech sensor variable.
Make Ohbot react to spoken words.
Make Ohbot recognise and track faces.
Use a variable to make Ohbot become sleepy.
Ask a question and wait for a human to type an answer.
Make Ohbot find a Wikipedia page and read it.
Intersperse speech, smiles and frowns by using a variable.
Make Ohbot broadcast messages between stacks of blocks.
Document explaining the Ohbot 2.1 example programs
Picture
Document explaining the Ohbot1 example programs
Picture
Download Ohbot1 and Ohbot2 example programs
Picture
How to download the examples
Direct link to the examples folder
Picture
Code snippet cards for Ohbot V1
Picture
Picture

​Ohbot Ltd.
Studio 5, Halliday's Mill
London Road, Chalford
Gloucestershire, GL6 8NR
United Kingdom
​
​Copyright 
© Ohbot Ltd.  All rights reserved.
Ohbot
® is a registered trademark of Ohbot Ltd.
Picture
  • OH
  • About
  • Buy
    • Buy Ohbot for Windows
    • Buy Ohbot Pi >
      • Ohbot Pi Assembled
      • Ohbot Pi Kit
    • Buy Picoh
  • Make
    • Assemble Ohbot Kit
    • Install software
    • Accessories
    • Technical Notes
    • Talk
    • Help
  • Program
    • Learn Ohbot
    • Code snippets
    • Projects
    • Block Glossary
    • Ohbiverse
  • Contact