Tinker - where can I get old source code for use with Core please?


i have an old Core which I recently flashed via CLI with CC300 and Tinker… it works fine and I wanted to do some hacking (adding a variable / publish it) within the tinker code but…
When I flashed it again with the Web IDE version of Tinker it didn’t read any pins (pin 404 error) - eventually I re-flashed Tinker via the CLI and all is well again.

So my question is: which tinker code does the CLI install and what is the difference from the Web IDE version please?


Ian - which device OS did you flash onto the Core? If you use $ particle flash --usb tinker from the CLI then it should put the version of tinker built for the Device OS but to be sure you could download and flash the tinker for the Core and the Device OS i.e. $ particle flash --usb "tinker-0.7.0-core.bin" .

Not sure I understand what you mean/are asking:

by which tinker code does the CLI install and what is the difference from the Web IDE version please?

Under the Device in Devices there is a drop down that shows the device ID, system firmware target and on device OS is this what you mean? When you build/compile in the Web IDE it will use the system target device OS. However, flash OTA of certain device OS versions does not happen automatically and you can’t down grade OS. I might be a little rusty on Cores - stopped using them 3 years ago!

For the Core there is no separation between device OS and application firmware.
When building for the Core you always get a monolithic binary containing all active code (apart from the bootloader).

Thanks for the answers - ScrufR, yes that’s what I thought - so what I am looking for is:

When I flash Tinker via the CLI to the core ($ particle flash --usb tinker), what code is it actually applying please? I would like the source code rather than just a bin so I can edit it.

I am assuming it is different from what is available on the Web IDE (option 6, Tinker) because my core doesn’t work when I flash that version. (In fact, just now looking at the eg function restriction to 12 chars for Core, the Web IDE Tinker function version has eg “tinkerDigitalRead” = 17 chars, snip from docs… “Up to 15 cloud functions may be registered and each function name is limited to a maximum of 12 characters (prior to 0.8.0), 64 characters (since 0.8.0). The Spark Core remains limited to 12 characters.”)

Any idea where I can get the Tinker source code for the Core still please?

I’m not sure, but I think it’s still 0.4.2 as there is no special demand that would require more.
But you could try particle serial inspect in Listening Mode to see what’s on the device.

BTW, the actual function name is not restricted to 12 characters. That limit only applies to the exposed function string.

	Particle.function("digitalread", tinkerDigitalRead);
	Particle.function("digitalwrite", tinkerDigitalWrite);
	Particle.function("analogread", tinkerAnalogRead);
	Particle.function("analogwrite", tinkerAnalogWrite);

This code fully adheres to the 12 char limit as it only applies to the first parameter.

I’m pretty sure the Tinker code on Web IDE does work when left as is.
Unfortunately I have no Cores left to try, but I’d be really, really, really surprised if that code didn’t work anymore.
There must be another reason than just the target version.

Ok, thanks again for the prompt reply… particle serial inspect returns “Platform: 0 - Core”??

it seems that flashing via via wifi just isn’t working for me… I flashed the “web-connected led” code (via web ide), it seems to load ok but i always get -1 returned.
If I flash the Tinker code via web ide, it again seems to load ok. However, i always get -1 returned from eg the ‘digital read’ function (pin number out of range).

These results are obtained via the Particle Dev desktop app and the Web IDE Console.

Any more thoughts please? I guess I can try compiling code via the web ide but flashing it via usb?

Thanks again,

In case you are still looking for it, here’s the source code for tinker:


1 Like