Changeset - 735b62d9b05e
[Not reviewed]
default
0 2 0
kripperger@CL-SEC241-09.cedarville.edu - 12 years ago 2013-03-21 14:34:51
kripperger@CL-SEC241-09.cedarville.edu
Camera work
2 files changed with 14 insertions and 7 deletions:
0 comments (0 inline, 0 general)
slave/slave/config.h
Show inline comments
 
@@ -30,6 +30,8 @@
 
//Sensors and IO
 
#define SENSOR_LOOP 200				// Frequency of sensor reads (in ms) (should be 200)
 
#define HEATER_THRESHOLD 0			// Temperature threshold in Fahrenheit where heater is activated
 
#define CAMERA_FREQ 30000		// Camera pulse frequency
 
#define CAMERA_PULSE 50			// Camera pulse duration
 
 
 //I2C Addresses
 
 #define EEPROM_ADDR 0xA0		// Read 0xA1 - Write 0xA0
slave/slave/modules.c
Show inline comments
 
@@ -14,6 +14,9 @@
 
 #include "lib/spi.h"
 
 #include "lib/i2c.h"
 
 #include "lib/sensors.h"
 
 #include "lib/loopTimer.h"
 
 
 
 uint32_t lastPicture;
 
 
 
 void modules_setup(uint8_t id)
 
 {
 
@@ -140,13 +143,15 @@
 
 void modules_cameras()
 
 {
 
	// Gathers data and performs functions for cameras daughter board
 
	int16_t pcount;
 
	if pcount == 1000
 
	{
 
 
		cameras_readAccelXYZ();
 
		cameras_sendPulse();
 
		pcount = 0;
 
	}
 
	pcount	++;  
 
		
 
		if ((time_millis() - lastPicture) > CAMERA_FREQ)	// Frequency of photos
 
		{
 
			cameras_sendPulse();
 
			lastPicture = time_millis();
 
		}
 
			
 
 
 } 
 
  
 
\ No newline at end of file
0 comments (0 inline, 0 general)