Arduino IDE support ? Tinker mandatory for using API ? WiFi "stock" features?

Hi there,

I got few questions about the Core :

  • Is it planned an integration with the Arduino IDE (to compile stuff locally, without being connected to the Spark Cloud)
  • Is it possible to use the API in a standard sketch bypassing the Tinker framework ?
  • Standard WiFi chip features are allowed with the Core ? Like connecting locally on a network, making request elsewhere (for example using the Spark API and making request on another webserver at the same time)

Cheers,
Thomas

Hey @Thomas,

Sure, happy to answer questions:

Thanks,
David

1 Like

Thanks for the quick answer @Dave. I was too impatient and didn’t read all the doc provided. Everything seems really easy to use, well done ! :smiley: I’m eager to test out some stuff with other third party libraries and see what happens.

2 Likes

Hi @exposure - I’m sorry that our communication during the Kickstarter campaign wasn’t clear enough, but when we said that it runs Wiring, that is 100% true. It does run Wiring. We are working on porting the top priority libraries, and the community is doing a lot more. But there is nothing that we can do to make this go faster, because the STM32 micro-controller is different than the ATmegas that Arduino uses.

If you have a request, this forum is the best place for it; our roadmap is constantly shifting and is driven by the feedback that we receive here! One of the things that we are working on is a good method for incorporating community-generated libraries.

@zach, I’ve been working on trying to get the DHT22 library ported over, but I’m no C guru and have stumbled into issues. I’m trying to resolve those myself first, but I may come back to the forums for help when I’ve beaten my head against the keyboard too much.

One thing I did notice was that the DHT22 library that I have used in the past wants to include “arduino.h”, which obviously doesn’t exist. However, a simple workaround to that (after removing the include statement) is to just use:

#define ARDUINO_H
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>

It’s a terrible hack, I’m sure, but it seemed to satisfy the compiler. Also, the “word” data type seems to be missing. I tried fixing that with typedef uint16_t word; and it seems to work. I have no idea what the heck I’m doing with this header stuff, but it’s somewhat working so far! I might seek the tutelage of one of my C buddies in the near future. :wink:

@exposure I think you misunderstand what “Arduino Compatible” and “Runs Arduino Code” means. Arduino is both a platform, an application and an ecosystem.

The Arduino IDE is based on Wiring, which is a C++ like microcontroller programming extension of Processing. When something is “Arduino Compatible” that doesn’t mean that it works with the Arduino IDE. Instead, it just means that it supports Arduino sketches and libraries with some modifications to the code.

For example, I can’t just compile and upload a sketch to my Texas Instruments MSP430-based Launchpad in the Arduino IDE as they’re completely different platforms! However, I can run most Arduino sketches and libraries in Energia (a lot of which require small modifications) since it’s an Arduino Compatible version of Wiring/Processing designed to work with MSP430 hardware.

The same is true of the Spark Core. The Spark Build site is their version of the IDE, though you also have the option of using an ARM toolchain and compiling, then flashing programs to the Spark Core locally over USB. This is a brand new product, so if you’re not capable of porting sketches and libraries yourself then you’ll need to wait a bit for other people to do it.

I’m sorry you were confused by the wording on the Kickstarter, hopefully my explanation helps clear things up a bit. :grinning:

1 Like