Hi everyone, I working with two cc13xx device and I would like to implement a serial communication between device. I think that used a HyperTerminal, but I read on UART and not communicate.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone, I working with two cc13xx device and I would like to implement a serial communication between device. I think that used a HyperTerminal, but I read on UART and not communicate.
Ok i see! Now I would like to on/off led through the serial. Do you understand?
For example (I type 1 on led, I type 0 off led)
Before I sent you a code with the LEDs okay?
#include "contiki.h" #include "dev/serial-line.h" #include "dev/leds.h" #include "dev/cc26xx-uart.h" #include <stdio.h> #include <stdint.h> PROCESS(test_serial, "Serial line test process"); AUTOSTART_PROCESSES(&test_serial); /*-------------------------------------------------------*/ PROCESS_THREAD(test_serial, ev, data){ PROCESS_BEGIN(); printf("Wait\n"); leds_on(LEDS_YELLOW); while(1){ PROCESS_WAIT_EVENT_UNTIL((ev==serial_line_input_byte)); printf("Insert the character! \n"); if(ev == 0) { printf("Led off!\n"); leds_off(LEDS_YELLOW); ev=1; } else if(ev == 1) { printf("Led on!\n"); leds_toggle(LEDS_YELLOW); ev=0; }} PROCESS_END(); } /*--------------------------------------------------------------------------*/
I'm listening to you, but if you do not understand, I can not do anything! You gave me the example and I tested it. I wrote a code with the part of the LEDs and you told me it was not okay. But what's wrong ?! Are you here to help or to make people angry?
For generate this example of Communications between device, where is the file that Ì modify?