I’m working on a sketch that reads a joystick pad on my ipad and sends x/y values to a MCP4261 chip. I’m using Arduino Manager as the IOS app and Arduino Code Manager was used to create the starting sketch.
I have modified the sketch to determine the 2 pieces of data to send to the chip - the address (0 or 18) and a value between 0 and 255, which is the pospot variable. I will be using pin 4 on my Uno to send this data.
I think I need to use commands digitWrite and SPI.transfer but I’m unsure if these are the right commands and where to ‘put’ them.
I’ve attached the sketch
BTW - I know there are extra code in the sketch which I’ll be deleting
Proto2.ino (2.07 KB)