Output data from realdash to arduino

Hello,

I want to active fan throw press button on realdash using arduino.

I created a button on realdash app :

Then I attached a new action to the button :

And for action type I choosed “Send CAN frame”, But what should I put in the field “FRAME” ?

Here is my XML file :

<RealDashCAN version="2">
	<frames baseId="3200">
		<frame id="3200" writeInterval="1000">
			<value name="OnOff_FAN" units="bit" offset="0" length="1"/>
		</frame>
	</frames>
</RealDashCAN>

And here is my arduino code :

byte incomingFrame[17] = { 0 };
unsigned int incomingFramePos = 0;
unsigned int digitalPins = 0;

int OnOff_FAN = 5;

void setup() 
{
	Serial.begin(9600);
}

void loop() 
{
	while (Serial.available() > 0)
	{
		incomingFrame[incomingFramePos++] = Serial.read();
		
		if (incomingFrame[0] != 0x44)
		{
			memset(incomingFrame, 0, 17);
			incomingFramePos = 0;
		}

		if (incomingFramePos >= 17)
		{
			if (incomingFrame[0] == 0x44 && incomingFrame[1] == 0x33 && incomingFrame[2] == 0x22 && incomingFrame[3] == 0x11)
			{
				unsigned long canFrameId = 0;
				memcpy(&canFrameId, incomingFrame + 4, 4);
				  
				byte checkByte = 0;
				for (int i=0; i<16; i++)
				{
					checkByte += incomingFrame[i];
				}

				if (incomingFrame[16] == checkByte)
				{
					if (canFrameId == 3200)
					{
						memcpy(&digitalPins, incomingFrame + 8, 2);
					
						digitalWrite(OnOff_FAN,  HIGH);
					}
				}

				memset(incomingFrame, 0, 17);
				incomingFramePos = 0;
			} 
		}
	}
}

Hi,

Just yesterday I was testing with an srduino and that function. It’s easy in “frame”;

You have to enter the CAN bus ID and the message

(similar to this: 223: 01 02 03 04 05 06 07 08). Send the previous message with ID: 223.

i

In my case, the Can bus ID should be : OnOff_FAN ?

I want to write on digital 5 pin in arduino, what message should I enter please ?

Thank you

Based on your XML, it would be:

C80: 01