Another simple question....

Forums:

Afternoon,

Ok So I have my Pi, ultraborg set up as per the instructions ( https://www.piborg.org/ultraborg/install )
But I am stuck already!
Have done this part - To run through the automatic installer just use this one line in a terminal:
bash <(curl https://www.piborg.org/install-ultraborg.txt)

and get both icons on my desk top but couple issues from here.... the icons do nothing when clicked? Is there something else I should be doing?

Then trying to do the other part of the coding ---
Open a terminal and start a Python prompt as follows:
cd ~/ultraborg
python
Load the library
import UltraBorg

---
I get an error when I do the 'import ultraborg' - See attached

What have I missed?

Images: 
piborg's picture

Python is case-sensitive, this means it is not finding the file.

You need to enter: import UltraBorg
making sure the U and B are upper-case letters.

Didn't notice the uppercase, will make sure I keep a closer eye on that from now on!

Can you advise an example code for my project? Once movement is sensed I want there to be a delay and then the servo moved and then go back to start, at a later date I would also want some sound to be played!

piborg's picture

I think the example here would be a reasonable starting point:
https://www.piborg.org/comment/4646#comment-4646

You will not need the PicoBorg Reverse library, instead you will want to use the UB.SetServoPosition1 call using one possition instead of 'off' and another instead of 'on'

Subscribe to Comments for &quot;Another simple question.... &quot;