Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Need some guidance on starting out


I’m new to c programming and wixel but I want to create an app where the wixel receives data from a specific device using its radio, then transmits it over its pins (I think using UART?) To a Bluetooth card.

I believe I have all the hardware needed. What files in the sdk should I focus on to make this app. I have (such as how to refer to the pin i want) no clue as to what the numbers and other things that the functions are calling actually do so I know I’ll have to do some reading. Also, is there a way to view the data being captured by the wixel on a computer or just a way to debug in general? I’ll need to be sure that the rssi and the data being received is good.



You might be interested in the xDrip project. That project involves a Wixel that receives data from another device and converts it to serial using the UART. The serial data is then transmitted over Bluetooth.

If you want to know what a specific function or library in the Wixel SDK does, you should look at the Wixel SDK Documentation. The front page of that documentation also has links to other resources you might need, such as the SDCC compiler documentation and the CC2511F32 datasheet.

For debugging, I recommend using the usb_cdc_acm library to send debugging information to the computer. A good example program that uses usb_cdc_acm for debugging is the radio_sniffer app.

Probably one of the first steps in your project should be to modify the Wixel’s radio settings so that the radio_sniffer app can read the data from your device and report it to a computer over USB. The radio settings used by that app are found in the radio_registers library, and you will need to edit them to make sure they are compatible with the configuration of the device you are talking to.



I took a look at it starting with the main function so I could see what was happening and try to reference the functions in the sdk or that the programmer defined above the main function. My problem is that I can’t tell what functions are doing that he made or even what all the variables are like P1DIR… In not sure what that’s referencing or what is being done to it. My background is in python and I’ve literally just started learning c and it’s syntax, but I try to look up anything I don’t understand as it comes up in the code but there’s still a lot I’m not getting.


When you see an unfamiliar term like P1DIR, I recommend going to both pololu.github.io/wixel-sdk and typing that term into the search box. In the case of P1DIR, the code search on github.com shows that P1DIR is a special function register (SFR) defined in cc2511_map.h. The special function registers are special parts of the hardware in the CC2511 processor that you can read from or write to directly in your C code. Reading and writing SFRs is the mechanism that allows your C code to actually talk to the microcontroller and get it to do something; without them, your code would have no way of interacting with the outside world. All of these registers and the individual bits inside them are documented in the CC2511 datasheet.