Hi,
I am not sure what's wrong with my code, but the compilier keep giving me error
here is my code:
the error message:
Compiling code. 0.08
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 117
spi=yoy
penSpiMaster(miso,mosi,clk,slaveselect,spi.RATE_125K,False,False)
javac 1.6.0_26
src\sweetek\ioio\experiment\main.java:344: inconvertible types
found : anywheresoftware.b4a.agraham.ioio.B4AIOIO.B4ADigitalOutputWrapper[]
required: ioio.lib.api.DigitalOutput.Spec[][]
mostCurrent._spi.setObject((ioio.lib.api.SpiMaster)(mostCurrent._yoy
penSpiMaster((ioio.lib.api.DigitalInput.Spec)(_miso.getObject()),(ioio.lib.api.DigitalOutput.Spec)(_mosi.getObject()),(ioio.lib.api.DigitalOutput.Spec)(_clk.getObject()),(ioio.lib.api.DigitalOutput.Spec[][])(_slaveselect),mostCurrent._spi.RATE_125K,anywheresoftware.b4a.keywords.Common.False,anywheresoftware.b4a.keywords.Common.False)));
^
1 error
I have no clue how to dim a SlaveSelect array.
and the last line, I just can't figure out what is the right statement.
can you help? THNAKS!
Eric
I am not sure what's wrong with my code, but the compilier keep giving me error
here is my code:
B4X:
Dim slaveselect() As DigitalOutput
Dim mosi As DigitalOutput
Dim miso As DigitalInput
Dim clk As DigitalOutput
mosi= YOYO.OpenDigitalOutput(3,mosi.OP_NORMAL ,True)
miso= YOYO.OpenDigitalInput(4,miso.IP_FLOATING)
clk=yoyo.OpenDigitalOutput(5,clk.OP_NORMAL,True)
'slaveselect(0)=yoyo.OpenDigitalOutput(6,slaveselect(0).OP_NORMAL,True)
spi=yoyo.OpenSpiMaster(miso,mosi,clk,slaveselect,spi.RATE_125K,False,False)
Compiling code. 0.08
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 117
spi=yoy
javac 1.6.0_26
src\sweetek\ioio\experiment\main.java:344: inconvertible types
found : anywheresoftware.b4a.agraham.ioio.B4AIOIO.B4ADigitalOutputWrapper[]
required: ioio.lib.api.DigitalOutput.Spec[][]
mostCurrent._spi.setObject((ioio.lib.api.SpiMaster)(mostCurrent._yoy
^
1 error
I have no clue how to dim a SlaveSelect array.
and the last line, I just can't figure out what is the right statement.
can you help? THNAKS!
Eric
Last edited: