I’ve built the hexy and am now examining options for modifications and upgrades. I’ve downloaded the PoMoCo V1.2 and PoMoCo V2.1 Python files from the thread at [url]Software modifications and upgrades of Hexy]. I fully understand that this is NOT an official Arcbotics release but one created by the user community.
I’ve not programmed in Python before; however, I am technically minded and don’t hesitate tackling unknowns like this. I have programmed in C, Arduino & VB. My problem is this… I can’t seem to get the code to run through the Python interpreter correctly. It seems to get hung up on the sections of code that define global variables with the “builtins” function. For example, early in the PoMoCo.py code it attempts to define a global variable “floor” by the following statement:
When I run PoMoCo, I’ll get a Traceback error something like "AttributeError: ‘dict’ object has no attribute ‘floor’
I’ve researched this bit of code extensively and all indication is that it is NOT recommended to define global variables using builtins. Even though it is not recommended, it apparently has worked for this Python program before. It just doesn’t work for me! The official Python documentation suggests creating a separate module file that defines global variables visible to all modules that ‘import’ the said module.
I’m using Python version 2.7.6 through the “Enthought Canopy” development environment. I’ve got all the recommended libraries installed (Pyserial, Pygame, numpy, Pyaudio, matplotlib). Any help with builtins or another workaround would be greatly appreciated.