charmedlabs / pixy2

Other
131 stars 98 forks source link

setLamp not exposed to python #10

Open spinkho21 opened 5 years ago

spinkho21 commented 5 years ago

It appears that the python API does not expose the setLamp method. We would like to use that from Python!

johnleimon commented 5 years ago

spinkho21,

Check out the pixy_set_lamp_demo.py example in the _pixy2/src/host/libpixyusb2_examples/pythondemos folder for an example of using this method.

From pixy_set_lamp_demo.py :

pixy.set_lamp (1, 0);

The binding file that exposes the setLamp(...) method is pixy_python_interface.cpp which is located in the same folder.

From pixy_python_interface.cpp :

void set_lamp (int upper, int lower)
{
  pixy_instance.setLamp (upper, lower);
}

Cheers, John