Electronics part 3: Configuration of the PixyCam 2

The PixyCam needs to be configured in order to work with the scripts on the Arduino. The Pixymon software is able to safe parameters at the PixyCam.

Step 1: Install Arduino library

To use the PixyCam with the Arduino, you need to download the latest library zip-file and import it in the Arduino IDE via Sketch -> Include Library.

The zip-file for the PixyCam2 can be found at "https://pixycam.com/downloads-pixy2/".

The zip-file for the PixyCam1 can be found at "https://pixycam.com/downloads-pixy1/".

Step 2: Install Pixymon

Download the Pixymon software (at Pixycam.com)

Step 3: PixyCam orientation

Once again make sure that the lens of the PixyCam is pointing away from the table side where rewards get provided.

Step 4: Light settings

Note

As experiments most likely are done in the dark, extra light sources are needed. Place the light sources at the side and not below the plexiglass book to minimize reflections for PixyCam detection.

Use the lightning settings in the "Pixy Parameter" submenu to optimize the visibility in the Pixymon viewer. You need to check what works best at your setup place. A better visibility of objects in the viewer will result in better object detection.

Step 5: Block detection

The detection configuration will be saved on the PixyCam and can be used with the Arduino scripts.

Step 6: Configuration of coordinates

In the definitions.h you need to specify the y-axis minimum and maximum coordinates of the movement of the platform. Further you need to change the y-axis motor threshold which triggers the motor if the mouse is in the lane. As the mouse moves forwards in a lane, the platform moves to the non reward side of the air table. You need to determine the y-axis value when the mouse is deep enough in the lane.

In definitions.h the PixyCam coordinates for our set up are set to:

Note

It's recommend to watch the video and the block detection while running the experiment

Reminder

You must have the camera connected to a PC during the usage.


Previous page | Next page