Things used in this project

Hardware components:
A000053 iso both1
Arduino Micro & Genuino Micro
×1
Servo (generic)
×1
1434509556 android phone color
Android device
×1
SparkFun WiFi Breakout - CC3000
×1
Software apps and online services:
Android

Schematics

basic schematic
Obt schem ux1ji8eg6j

Code

ATmega32u4_ServoObjectTrackingC/C++
/*
*	Author		: Zavala Ortiz Vicente Arturo.
*	language	: .ino
*	Date		: Friday April 18 2014.
*	Update		: Friday June  06 2014.
*	Name		: ATmega32u4_ServoObjectTracking.ino
*	Description : Tracks circle coloresd objects
*/
#include <avr/delay.h>

/*		servo libs			*/
#include "_Servo.h"

/*		WiFi libs			*/
#include "CC3000.h"
#include "CC3000_Client.h"
#include "common.h"

Servo servo_x;
Servo servo_y;

void setup()
{
	/* add setup code here */
	ConnectionInfo connection_info;
	
	// Initialize CC3000 (configure SPI communications)
	#ifdef CC3000_DEBUG
		Serial.begin(115200);
	#endif
	
	// Initialize CC3000 (configure SPI communications)
	if(!wifi.init(9)) {
		#ifdef CC3000_DEBUG
		DEBUGPRINTLN(PSTR("Initialize CC3000 FAIL!"));
		#endif
		return;
	}

	else {
		//FreeRam();
		#ifdef CC3000_DEBUG
			DEBUGPRINTLN(PSTR("Initialize CC3000 OK"));
		#endif
	}

	if(!wifi.connect(ap_ssid, ap_security, ap_password, timeout)) 
	{
		#ifdef CC3000_DEBUG
			DEBUGPRINTLN(PSTR("Error: Could not connect to AP!"));
		#endif
	}
	
	
	// Gather connection details and print IP address
	if(!wifi.getConnectionInfo(connection_info) )
	{
		#ifdef CC3000_DEBUG
		DEBUGPRINTLN(PSTR("Error: Could not obtain connection details"));
		#endif
		return;
	}
	
	else
	{
		#ifdef CC3000_DEBUG
		DEBUGPRINT(PSTR("IP Address: "));
		printIPAddr(connection_info.ip_address);
		#endif
	}

	pin_mode(SERVO_PIN_X, OUTPUT);    // declare the LED's pin as output
	pin_mode(SERVO_PIN_Y, OUTPUT);    // declare the LED's pin as output

	servo_x.attach(SERVO_PIN_X);
	servo_y.attach(SERVO_PIN_Y);

	// center servos
	servo_x.write(SERVO_CENTER_X);
	servo_y.write(SERVO_CENTER_Y);

	_delay_ms(200);
}

void loop()
{
	
}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Using Nokia 3310 84x48 LCD with Arduino
Advanced
  • 5,478
  • 84

Protip

These 84 by 48 pixel LCDs are what you might have found in Nokia 3310. And what about using them in the Arduino projects?

LiVduino
Advanced
  • 228
  • 5

Work in progress

Home monitoring (temp, humidity, light) and automation. Simple, flexible, reliable.

A Sudoku Solver's Robot
Advanced
  • 2,137
  • 15

Full instructions

Sudoku-robot is a robot that solves and fills Sudoku grids!

Raspberry Pi - Powered Candy Dispenser
Advanced
  • 1,744
  • 9

Full instructions

Make a candy machine that can give candy with a push of a button or a tweet!

RING PONG
Advanced
  • 910
  • 0

A simple Ping Pong game played on a NeoPixel Ring with Arduino.

New Electronic Music Instrument Design
Advanced
  • 1,002
  • 7

A new piece for percussion quartet seeks to bring physicality to electronic music using two custom musical instruments.

ProjectsCommunitiesTopicsContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login