I found the easygopigo API documentation here
Example Usage:
import easygopigo
egpg = EasyGoPiGo3()
print(“battery voltage: %.1f” % egpg.volt()
Examples/Read_Info.py uses the “non-easy” class:
usage:
import gopigo3
gpg = gopigo3.GoPiGo3()
print("Battery voltage : ", GPG.get_voltage_battery() )
print("5v voltage : ", GPG.get_voltage_5v() )
It seems like section 5 and 6 would be better named “API EasyGoPiGo3 - Basic” and “API EasyGoPiGo3 - Advanced”.
Is there a draft document of “API GoPiGo3 - Wizard Level” somewhere for the GoPiGo3() class?
Hi @cyclicalobsessive,
We thought that having a shorter title for the section is better than having something longer and possibly more confusing.
Following this logic, you end up in a place where you ask yourself if there is a difference between “EasyGoPiGo3” and the actual GoPiGo3 robot when someone sees “API EasyGoPiGo3 - Basic/Advanced”, hence leading to confusion.
The 2nd thought we had is that this library is about the GoPiGo3 and not about the naming preference of a certain module. For instance, OpenCV is named OpenCV and yet the import module is still called cv2
- notice that their API reference chapter is called “OpenCV API Reference”.
That “Wizard Level” is quite funny actually - similar to Tesla’s “Ludicrous Mode”.
For the moment, we decided that if more tech-savvy want to play with the GoPiGo3
class, they can always go through the source code and read the docstrings by themselves - the docstrings are self-explanatory. What is your opinion?
This doesn’t mean we won’t add this module to the documentation - if users show an interest in having this documented, we will do that.
For the time being, the GoPiGo3
class (actually the whole gopigo3.py
module) is found here:
Thank you!
1 Like
I found my way to the DI Github source for gopigo3.py and agree that it is very well self-documented. I found some gems that I will want to use in the future.
I’m still weak with Python - does:
class EasyGoPiGo3(gopigo3.GoPiGo3)
mean that an egpg object “inherits” all the GoPiGo3 class methods?
Very cool. GPG3 should arrive in 3 days - I’m too excited.
Thanks again.
import easygopigo
egpg = EasyGoPiGo3()
print(“Battery voltage: %.1f” % egpg.volt()
#inherited methods from GoPiGo3 base class
print("Battery voltage : ", egpg.get_voltage_battery() )
print("5v voltage : ", egpg.get_voltage_5v() )
If you want to format code on a post, you can use the markdown notation. Basically, enclose your code with ``` (3 grave accents in a row) at the start and at the end. There’s no need to actually quote the code.
Here’s an example of what you can get:
import easygopigo
egpg = EasyGoPiGo3()
print(“Battery voltage: %.1f” % egpg.volt()
#inherited methods from GoPiGo3 base class
print("Battery voltage : ", egpg.get_voltage_battery() )
print("5v voltage : ", egpg.get_voltage_5v() )
Read this:
https://help.github.com/articles/creating-and-highlighting-code-blocks/
Thank you!
1 Like