i have put back the typedef struct, and used joystick_report.x and now it works, but in windows the axis goed to 127 and then jumps to -127 and it does this a few times before it centers on 0.
if i take wdt_reset(); out of the main loop the device wil reset itself every second. its there in case the code stops working, and then the device wil restart/reconnect itself.
here is how I do it. //voltage reader. #define ADC_VREF_TYPE 0x40 static int read_adc(unsigned char adc_input) { ADMUX=adc_input|ADC_VREF_TYPE; _delay_us(150); ADCSRA|=0x40; // Start the AD conversion while ((ADCSRA & 0x10)==0);// Wait for complete ADCSRA|=0x10; return ADCW; } reportBuffer[1]= ...
Hello, i am trying to make a USB-hid device with a atmega328p and i want to use multiple ADC channels. i have looked at the examples on the main site of objective develpment, but i still can't get it to work propperly. i have managed to get two channels to work but al other channels just have someki...