Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

N5 Starter Kit ADC Measurement

Rank

Total Posts: 3

Joined 2015-10-13

PM

Hello,

I would like to use the N5 Starter kit to measure a small voltage, and then wirelessly send its value to a computer. As a first step, I would like to learn how to use the ADC on the nRF51 chip.

I located an example project from the nRF51 SDK, adc_simple, and attempted to follow the modification procedure for running Nordic code examples with the N5 Starter Kit (as described in section 7.1 of the N5 Starter Kit manual). While I was able to get the blinky example to work, I could not even get the adc_simple example to compile. I received the following errors:

..\..\main.c(85): error: #20: identifier "RX_PIN_NUMBER" is undefined
RX_PIN_NUMBER,

..\..\main.c(86): error: #20: identifier "TX_PIN_NUMBER" is undefined
TX_PIN_NUMBER,

..\..\main.c(87): error: #20: identifier "RTS_PIN_NUMBER" is undefined
RTS_PIN_NUMBER,

..\..\main.c(88): error: #20: identifier "CTS_PIN_NUMBER" is undefined
CTS_PIN_NUMBER,

I assume this is because the n5_starterkit (located in C:\Keil_v5\ARM\Device\Nordic\examples\bsp) header file does not contain definitions for the above pins, while the pca10028 header file does. I noticed that the pin numbers defined in the pca10028 header file are assigned to other constants in the n5_starterkit header file (like buttons or switches, for example). Does this mean that this project is incompatible with the n5 starter kit?

Perhaps more importantly: am I even on the right track in attempting to use this example project? I apologize for my ignorance.

Thanks,
-Dylan      
Rank

Total Posts: 3

Joined 2015-05-07

PM

Hi Dylan,

This is one of the examples that isn’t supported out of the box with the hardware provided in the N5 starter kit.

You were correct that n5_starterkit.h does not have the proper definitions for the pins above, causing the project not to build.

These undefined pins are used for the UART portion of that example. Removing all UART portions would allow the project to build however this would require major modifications to the example as much of the functionality would be removed.

Cheers,
Mike