You are here

VESC Control over NRF

2 posts / 0 new
Last post
Christian
Offline
Last seen: 6 years 3 weeks ago
Joined: 2017-09-21 10:20
Posts: 6
VESC Control over NRF

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

m.juan
Offline
Last seen: 5 years 9 months ago
Joined: 2018-06-20 10:34
Posts: 3

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