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?
piborg
Thu, 03/31/2016 - 17:35
Permalink
Simple problem
Python is case-sensitive, this means it is not finding the file.
You need to enter:
import UltraBorg
making sure the
U
andB
are upper-case letters.djwmcnae82@gmail.com
Fri, 04/01/2016 - 10:47
Permalink
Thank you!
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
Fri, 04/01/2016 - 11:01
Permalink
UltraBorg example
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'