Quote:
|
Originally Posted by Rickertsen2
anyway here ya go:
PHP Code:
/*******************************************************************************
* FILE NAME: sensors.c
*
* DESCRIPTION:
* Contains routines to read DIRRS+ Sensors
*
* Function prototypes etc are in sensors.h
*
* BY: James Rickertsen
*
*******************************************************************************/
#include <usart.h>
#include <stdlib.h>
#include "printf_lib.h"
#include "ifi_default.h"
#include "ifi_aliases.h"
#include "user_routines.h"
#include "ifi_utilities.h"
#include "sensors.h"
#define SENSOR_SIGNATURE 0b10101010
|
James,
Thanks for the info, but it brings a few more questions. You've obviously used this code with the Edubot since you have references to "ifi_..." and "rc_dig...". Where exactly does this code belong? Do I copy it to the user_routines.c file or somewhere else? Also, you use the include directive for "sensors.h" but this doesn't seem to be in one of the directories with the Edubot sourcecode or /mcc18/h folder. If this is a separate header file, can you please post it as well?
The digital compass we are trying to use sends three bytes through the USART. Will these correspond to sensors[1], sensors[2] and sensors[3] directly, or is this just a coincidence?
Your help is appreciated.