Beginners: please read this post and this post before posting to the forum.
0 Members and 1 Guest are viewing this topic.
// -------- Start Analogue Input------- // Read the Analogue Input and store results uint16_t adc0val = a2dConvert10bit(adc0); // Dump out the value rprintf("adc0: %d\n",adc0val); // -------- End Analogue Input------- // -------- Start Generic PWM------- // The current duty cycle can be read as follows:- DUTY_CYCLE duty = pwmGetDutyCycle(led); // Or it can be set to 75% using duty = 75; pwmSetDutyCycle(led, duty);
@Webbot - This is a good example of what I predicted would happen. Any chance you will reconsider a pop-up when the designer auto-updates?
../hardware.h:59: warning: passing argument 2 of '_uartInit' makes integer from pointer without a cast
// ----------- Initialise built in devices ------void sysInitHardware(void){ SWITCH_init(&button); setErrorLog(&uart1SendByte); rprintfInit(&uart1SendByte); uartInit(uart1,null); <-line 59}
Its because you haven't specified a baud rate for UART1.So in Project Designer - open up the uart and set up a baud rate.Regenerate - and all should be ok