First Program for PSoC, LED Blinking

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

HI,

   

I switched form Arduino to PSoC today and followed PSoC101 tutorilas and executed the first LED Blink program.

   

I am using: CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit

   

 

   

I am not understanding why the following piece of code only making RED LED blink. Why Green and Blue is not working.

   

 

   

#include "project.h"

   

int main(void)
{
    CyGlobalIntEnable; /* Enable global interrupts. */

   

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

   

    for(;;)
    {
        /* Place your application code here. */
        Pin_Red_Write ( ~ Pin_Red_Read() );
        CyDelay( 500 );
        Pin_Blue_Write ( ~ Pin_Blue_Read() )  ;
        CyDelay( 500 );
        Pin_Green_Write ( ~ Pin_Green_Read() )  ;
        CyDelay( 500 );

   

    }
}

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

On my Pioneer kit (without BLE) all three colours are shown. Something else must cause that error.

   

 

   

Bob

View solution in original post

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum.

   

Probably the pin assignment of your LEDs is not right. Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

   

Thanks for responding.

   

 

   

Please check the atatchments.

   

 

   

Thanks.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

On my Pioneer kit (without BLE) all three colours are shown. Something else must cause that error.

   

 

   

Bob

0 Likes