Once I received that 30 char array I store it in Lbsįrom there using pointers I generate five Lbsx arrays with x=1,2,3,4,5, I changed completely my approach for this code.įrom external MCU through serial port I’m sending an array of 30 character which contain the reading of 5 sensors towards the photon serial input. Unsigned long lastLbs_5 // Global initialize to 0 Unsigned long lastLbs_4 // Global initialize to 0 Unsigned long lastLbs_3 // Global initialize to 0 Unsigned long lastLbs_2 // Global initialize to 0 Unsigned long lastLbs_1 // Global initialize to 0 Unsigned long lastEmail // Global initialize to 0 This #include statement was automatically added by the Particle IDE.Ĭhar auth = "745cf23fe70543bcbfcd68673d82e3ff" I suspect that something is happening with the time stamp I am using. Labeled values just display only the the first two values the others three are shown with no format ( Format is #,#). The Blynk app get disconnected periodically and reconnected. I am using Blink as GUI so that 5 labeled values display each of those analog reading. Then PSoC 5LP send 5 character buffers of 6 element each through the serial port towards the photon serial port 1. I’m working in a project that read 5 analog sensors trough a PSoC 5LP from Cypress. It’s been a year I am not working with Blynk nor Photon ! NOTE: If you don't want to see "LED1: ON.", comment out print()s in do_LEDs() function.ĬyGlobalIntEnable /* Enable global interrupts.I’m sorry I came in from the back door:confounded: When "0 ", which is '0' + ' ', both LEDs are offĬhar str /* one for NULL terminator */ĭatareceive = UART_GetChar() NOTE: This time I'm using my utility tty_utils.h and tty_utils.cĬyGlobalIntEnable /* Enable global interrupts. But let's make it outside the scope of this discussion. Probably we may not be able to expect perfect.įor even more robust/reliable communication you must introduce the concept of protocolĪs well as error correction. Hopefully this should be better than the previous one, but because of the nature of UART, I'm using a ring-buffer style read and write data from UART. Re: tty_utils a utility sample for CLI type program To make it a little more robust, I'd like to use my tty_utility. If (datarecive='0')/* Place your application code here. I have attached the code that i m trying to do but that thing is not working properly So I am thinking like If I can save 2 bytes(1st letter,2nd letter) of data to an array and then read from array to drive the led_1 and led_2 according to values.can anyone please help me regarding this? Similarly for 3rd bit : i want to drive led_1 and for 4th bit : i want to drive led_2 and so on txt file contain Example: 1000100101 so according to this streamġst letter is : 1 so i want to drive led_1 on some pin andĢnd letter is : 0 so I want to drive led_2 on some pin that I am able to send by UART_Getchar function and by using tera term application.Īs my. txt file that contain 1 and 0 using the uart. I am new to cypress community,I am currently working with CY8Ckit-059 psoc kit.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |