Hello Benjamin, Hello Everybody,
I try to implement an NRF Communication for the VESC just with one Arduino on the one side and an NRF Connection on P3 of VESC HW 4.12 on the other side. I connected all the wires for the SPI communication and set CE to VCC.
I tried with the Default settings of the VESC:
- channel 76
- speed 2MBit/s
- CRC 1 Byte
- Retries 3, delay 250 µS
- and Adress[0]=198
- Adress[1]=199
Therefore I tried to send to Adress[0] my packets. I tried to implement a current control. Therefore I send the payload:
payload[index++]=MOTE_PACKET_PROCESS_SHORT_BUFFER;
payload[index++] = COMM_SET_CURRENT ;
buffer_append_int32(payload, (int32_t)(current * 1000), &index);
uint16_t crcPayload = crc16(payload, index);
payload[index++] = (uint8_t)(crcPayload >> 8);
payload[index++] = (uint8_t)(crcPayload & 0xFF);
With this payload it is not working. Is there a problem in my payload that the VESC cant interpret it? or maybe an error in my driver implementation to set the communication values. Or is there another setting for the VESC ID or something?
Thanks for your help!!
Best whishes,
Christian
Hi!
did you manage to do connect the arduino to the buit-in nrf of the vesc ?
I am trying to do the same thing but I can't even receive the alive packets.
M