- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am currently working on an RC car for which my wireless communication module is an H-05. The kit I am using is the CY8CKIT-059. I have never used them before but so far I have managed to pair them. I am currently trying to try something simple to test like driving an LED on the other board. So far I have been unsuccessful. I do not know how to attach a project so I will attach the code and some pictures which should be enough.
Transmitter:
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
int Rx;
char str;
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
UART_1_Start();
for(;;)
{
if(BTN_Read()==0){
UART_1_PutChar(100);
Pin_1_Write(1);
}
else{
UART_1_PutChar(100);
Pin_1_Write(0);
}
}
}
/* [] END OF FILE */
Receiver:
/* ========================================
*
* Copyright YOUR COMPANY, THE YEAR
* All Rights Reserved
* UNPUBLISHED, LICENSED SOFTWARE.
*
* CONFIDENTIAL AND PROPRIETARY INFORMATION
* WHICH IS THE PROPERTY OF your company.
*
* ========================================
*/
#include "project.h"
uint8_t Rx;
char str [120];
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
UART_1_Start();
for(;;)
{
Rx = UART_1_GetChar();
UART_1_PutChar(Rx);
}
}
/* [] END OF FILE */
Any help is appreciated.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GetChar() api will return a 0x00 when no data is present. Better use GetData() API and check the upper byte for status info.
To upload a project:
Use Creator->File->Create Workspace Bundle and attach the resulting .zip (using advanced editor)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
GetChar() api will return a 0x00 when no data is present. Better use GetData() API and check the upper byte for status info.
To upload a project:
Use Creator->File->Create Workspace Bundle and attach the resulting .zip (using advanced editor)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did not know I was supposed to, what should I enable it with?
Thank you for the files!