Quantcast
Channel: Cypress Semiconductor - PSoC 4 BLE
Viewing all articles
Browse latest Browse all 726

First Program for PSoC, LED Blinking

$
0
0
Forums: 

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 );

    }
}


Viewing all articles
Browse latest Browse all 726

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>