Go Down

Topic: connecting arduino mini to spark core (Read 506 times) previous topic - next topic

Zodon

Hello everyone!
In a project I am doing, I am trying to send data from a sensor to an Arduino mini and from there to the spark core, up to the cloud, 1st of all, is it even possible?
in case it is, before I start doing it, I tried to do a simple thing, write some code on the Arduino mini
on the arduino site they tell to connect the arduino mini to a usb adapter, but I dont have any right now, so I tought to try and use the spark core! here are the arduino mini guide on how to connect: https://www.arduino.cc/en/Guide/ArduinoMini#connecting
And here is the spark core specs:
https://docs.particle.io/datasheets/core-datasheet/
I connect:
spark core \arduino mini
Vin - +5V
GND - GND
*V3.3 - RST
TX - RX
RX - TX
But for some reason, when I try to upload a sktech, it just gets stucks on the "Uploading" part forever

tl;dr: how to connect spark core to arduino mini

Thanks!

DrAzzy

#1
Jun 02, 2016, 12:46 am Last Edit: Jun 02, 2016, 12:46 am by DrAzzy
The spark core is not a serial adapter, it is a microcontroller. You cannot use it as a serial adapter without uploading code to it that makes it act like one.

Additionally, any adapter used to program an arduino should bring out the dtr pin, since that is used to reset the board to make the bootloader run so you can upload to it. If it doesn't have this, you need to perfectly time pressing reset while uploading.

You should get an appropriate serial adapter. I got 20 for around a buck each shipped, with the correct pinout...
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Zodon

The spark core is not a serial adapter, it is a microcontroller. You cannot use it as a serial adapter without uploading code to it that makes it act like one.

Additionally, any adapter used to program an arduino should bring out the dtr pin, since that is used to reset the board to make the bootloader run so you can upload to it. If it doesn't have this, you need to perfectly time pressing reset while uploading.

You should get an appropriate serial adapter. I got 20 for around a buck each shipped, with the correct pinout...
Thanks for the answer!
What about my other question? once I use a usb adapter to load some code into my arduino mini, there should not be any problem using I2C protocol to communicate between them and send data, right?

Thanks again!

DrAzzy

#3
Jun 02, 2016, 07:30 am Last Edit: Jun 02, 2016, 07:31 am by DrAzzy
Thanks for the answer!
What about my other question? once I use a usb adapter to load some code into my arduino mini, there should not be any problem using I2C protocol to communicate between them and send data, right?

Thanks again!

Yeah - I2C communication should work fine. You may need to do some level shifting (depends on whether there are 5v tolerant I2C pins on the spark core - I know many STM32's do have some 5v tolerant pins, in which case you can run the I2C bus at 5v (using external pullups to 5v) and you don't need to do any level shifting. 


If there aren't 5v tolerant pins that you can use for I2C, you can get a very cheap level shifter on ebay - (just search for "level shifter" - the basic level shifter designs are astonishingly cheap - for example, http://www.ebay.com/itm/5PCS-IIC-I2C-Logic-Level-Converter-Bi-Directional-shifter-Module-5V-to-3-3V-ardu-/321997869214?hash=item4af891909e:g:llIAAOSwoydWshuQ 5x 4-channel level shifters for under $3 shipped )
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up