y[i] = ADC.read("P9_40")
IndexError: list assignment index out of range
the code:
i = 1
x = []*1000
y = []*1000
for i in range(1000):
y[i] = ADC.read("P9_40") # adc input pin
x[i] = (int)(y*2147483648) # conversion of float to int
this code is read data from analogue pin of beaglebone black and store the result in array
In python you can't call a uncreated index of a list
It should rather be like this