Hi, I'm fairly new to both Bela and C/C++. I'm trying to read values from a Thumb Joystick V1.1 through the Bela mini. It only prints out 0s. I have some code but have no idea whether I'm even going in the right direction or not.
This is the code I have so far:
#include <Bela.h>
const int joystick_pinX = 2;
const int joystick_pinY = 3;
bool setup(BelaContext context, void userData){
return true;
}
void render(BelaContext context, void userData){
int pinX = analogRead(context, 0, joystick_pinX);
int pinY = analogRead(context, 0, joystick_pinY);
rt_printf("Joyx: %f\n", pinX);
rt_printf("Joyy: %f\n", pinY);
}
void cleanup(BelaContext context, void userData){
}