When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Any way to get the CAN ID's for this? I want to make a desk clock out of it but I need the CAN ID to set the time. It defaults to 12;00 when powered on and the backlight is can bus. or if anyone even knows the range i can try and sweep it.
Last edited by freshfitz; Mar 24, 2024 at 03:31 PM.
That would work, but you'll be behind 30 seconds every day, which is less accurate than what quartz clock is capable of. (about +/- 15 seconds per month on average to as little as +/- 1 second/year)
Last edited by sam08861; Mar 26, 2024 at 06:58 PM.
I could do an ardino sync'd with NTP cut the power at 11:59:30 wait 15 secs power it back on about 10 15 secs for the hands to set it would stay in sync'd within a few secs. Would be cooler though if I could NTP sync with can bus and use the backlight tho
That would be cool, the unidirectional spin when you set the time back is cool to watch. Is the CAN ID something that one can get VIA VCDS scan? If so, I'd be happy to check this weekend.
It was a little bit of luck and a little bit of a needle in a hay stack. After finding the correct baud rate I got a can response from the click, like a Hi I'm here and awake. I took that CAN ID then built a script to increment each bit by 1. After like 45 secs I got a back light and movement. I slowed down the script and eventually was able to scrape the can ID"s
I used an Ardino canbed which has the esp and MCP2515 on 1 board - https://www.seeedstudio.com/CANBed-A...51-p-4365.html
Think this is the code I used, so it takes each bit starts it at 00 and increments by 1 to FF then moves to the 2nd bit and increments both then on to the 3rd, etc.
I have done alot of can projects so quite familiar with CAN bus and esp 32's
Hope that helps
/* This is for use with Sparkfun's CAN Bus Shield: https://www.sparkfun.com/products/10039 */ #include<Canbus.h> #include<defaults.h> #include<global.h> #include<mcp2515.h> #include<mcp2515_defs.h> voidsetup(){
Serial.begin(115200); Serial.println("CAN Write - Testing transmission of CAN Bus messages"); delay(1000);
if(Canbus.init(CANSPEED_125)) //Initialise MCP2515 CAN controller at the specified speed Serial.println("CAN Init ok"); else Serial.println("Can't init CAN");
delay(1000);
} int x = 0xFF; int b = 0xFF;
voidloop() { tCAN message; x++; // now x is 0xFB b = b + 1;
// message.id = 0x6B2; //formatted in HEX message.id = x, HEX; //formatted in HEX message.header.rtr = 0; message.header.length = 8; //formatted in DEC message.data[0] = b; message.data[1] = b; message.data[2] = b; message.data[3] = b; //formatted in HEX message.data[4] = b; message.data[5] = b; message.data[6] = b; message.data[7] = b;