Hi

I am using code from the hardware manufacturer of this chip in robotics I bought, but I'm a beginner in C.

The code is event driven. After x millisecond an eventhandler is called. This event handler receives a "void *userptr" variable for the user to do whatever they want with it.

In the main() I have declared "double dataset1[10]" and I pass the address on to the eventhandler.

In the eventhandler I need to access the data in dataset1 but I can't get the code right. I believe a typecasting is required here but can't get it right. Can someone tell me how I can access the data in the dataset1 array using the void *usertpr?

for example how do I retrieve the value of dataset1[1] ?

Thanks