Hello,
I have few problems with my Gluon board. I hope you can help me.
I'm using Gluonpilot v1o.
1) I've tried to connect the card to the "Gluon control station" and i saw that the sensors worked.
2) I have tried to write it a small program using "Lubin" blockset for simulink. This software was supposed to blink the LEDs and send some data from the I2C. I've transfer my program to the card using Mplab and PIKit 3. The led was blinking, but I saw no response on the I2C C,D ports (I have used a scope to check that. The C port was 0v and the D was 3.3v steady).
3) I have tried to write a small program in C, using the MPLAB. the program look like that:
#include <stdio.h>
#include <math.h>
#include "microcontroller\microcontroller.h"
#include "uart1\uart1.h"
#include "i2c\i2c.h"
#include "led\led.h"
void main ()
{
microcontroller_init();
uart1_open(115200l); // open UART1
printf ("Starting test...\n\r");
microcontroller_delay_ms(5);
i2c_init(); // Initialise the I2C(1) module
led_init();
led1_on();
led2_on();
while(1)
{
I2Cwrite(0x052, 0, 100);
led1_toggle();
microcontroller_delay_ms(100);
} // end while
} // end main
4) I have transfer the program to the gluon using the PIKit 3. The LEDs worked fine, but again, no response from the I2C.
5) i have tried to restore the gloun to his default by copy the hex file from Gloun's website (rtos_pilot_v0.7.2) . Then, i have tried to connect it to the "Control station" and it didn't work.
Only the red LED is blinking now.
Questions:
A) why does my I2C doesn't work?
B) What does it mean that only the red LED blinks (withe the rtos program)?
C) Is there any way to make the Gluon work again?
Thanks,
Lior