Hello. I have recently purchased a Pixy camera and was simply trying to run the hello world code (as is without any changes). The code uploads fine without any errors, however, when I try to open the serial monitor, it never goes past "Starting," as shown in the attached photo. Does anyone have any suggestions? Thank you
The code uploads fine without any errors
The code that you didn't post? You don't really want help, I guess.
as shown in the attached photo
Why would you post a picture of text? NEVER DO THAT AGAIN!
Hello PaulS, and thanks for the response. I didn't come here to be talked down on, and I'm sure you wouldn't appreciate someone doing that to you...
Here is the code (copied directly from Arduino's examples with no modifications)
//
// begin license header
//
// This file is part of Pixy CMUcam5 or "Pixy" for short
//
// All Pixy source code is provided under the terms of the
// GNU General Public License v2 (GNU General Public License v2.0 - GNU Project - Free Software Foundation).
// Those wishing to use Pixy source code, software and/or
// technologies under different licensing terms should contact us at
// cmucam@cs.cmu.edu. Such licensing terms are available for
// all portions of the Pixy codebase presented here.
//
// end license header
//
// This sketch is a good place to start if you're just getting started with
// Pixy and Arduino. This program simply prints the detected object blocks
// (including color codes) through the serial console. It uses the Arduino's
// ICSP port. For more information go here:
//
// http://cmucam.org/projects/cmucam5/wiki/Hooking_up_Pixy_to_a_Microcontroller_(like_an_Arduino)
//
// It prints the detected blocks once per second because printing all of the
// blocks for all 50 frames per second would overwhelm the Arduino's serial port.
//
#include <SPI.h>
#include <Pixy.h>
// This is the main Pixy object
Pixy pixy;
void setup()
{
Serial.begin(9600);
Serial.print("Starting...\n");
pixy.init();
}
void loop()
{
static int i = 0;
int j;
uint16_t blocks;
char buf[32];
// grab blocks!
blocks = pixy.getBlocks();
// If there are detect blocks, print them!
if (blocks)
{
i++;
// do this (print) every 50 frames because printing every
// frame would bog down the Arduino
if (i%50==0)
{
sprintf(buf, "Detected %d:\n", blocks);
Serial.print(buf);
for (j=0; j<blocks; j++)
{
sprintf(buf, " block %d: ", j);
Serial.print(buf);
pixy.blocks[j].print();
}
}
}
}
Try adding some more prints and see how far the code gets.
Try adding some code tags too.
