# Can't figure out the SM shield with a Leonardo Arduino

**URL:** <https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813>\
**Category:** General Discussion\
**Tags:** archive\_makers\
**Created:** [October 26, 2013, 8:17pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813 "2013-10-26T20:17:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![snooginsguy](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@snooginsguy](https://community.smartthings.com/u/snooginsguy)\
**Post date:** [October 26, 2013, 8:17pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/1 "2013-10-26T20:17:17Z")

</div>

Hi all,

I am having a heck of a time trying to figure out the problem with connecting the SM shield to a Leonardo arduino. I’m trying to run the simple on/off/hello sample sketch, and am getting “setup…” in the serial monitor but that’s it. Otherwise the SMartthings hub sees the shield and I have it set as the On/Off (example) option. I already added the "while (!Serial) ; portion to the code, so that should be working ok (I think…) I did see something about the 2-3 pins not being the same on the Leonardo that they are on the Duo, but I’m not completely clear on what that means or if/how I can get it to work. I’d love to have the Leonardo working with this, but I guess if need be I can spring for a Duo instead…

Thanks!

---

<div class="post-metadata">

**Author:** ![gopi2212](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gopi2212](https://community.smartthings.com/u/gopi2212)\
**Post date:** [October 27, 2013, 10:13am UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/2 "2013-10-27T10:13:25Z")

</div>

@snooginsguy, I found this line in the Smarthings.h header…Did you uncomment that line to define leonardo board type?

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
// @note Set to Leonardo here if using Leonardo board  
//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
//#define BOARD\_TYPE BOARD\_TYPE\_LEONARDO //TODO Incomplete

---

<div class="post-metadata">

**Author:** ![snooginsguy](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@snooginsguy](https://community.smartthings.com/u/snooginsguy)\
**Post date:** [October 27, 2013, 12:21pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/3 "2013-10-27T12:21:48Z")

</div>

Hi Surya,

thanks for the suggestion. I uncommented the line, but then the project wouldn’t compile at all! I then added the line #define BOARD\_TYPE BOARD\_TYPE\_LEONARDO to the sketch just under the lines to define the PIN\_THING\_RX/TX but that doesn’t seem to have done anything. Any other ideas?

Shoot, I did just notice in the info.txt of the smartthings libraries folder that on 2/8/2012 they “Began framework for working on Leonardo” but there’s no subsequent entry that it was finished. It seems that it’s unlikely the Leonardo will work after all? Bit disappointing if that’s the case since the arduino shield page specifies the Leonardo as working…

---

<div class="post-metadata">

**Author:** ![gopi2212](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gopi2212](https://community.smartthings.com/u/gopi2212)\
**Post date:** [October 28, 2013, 1:37pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/4 "2013-10-28T13:37:46Z")

</div>

calling in the big guns…@urman, @megapixel, @chrisb, @wackware …can one of you answer the question about how to get smartthings shiled working with the LEONARDO board?

---

<div class="post-metadata">

**Author:** ![chrisb](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/chrisb/32/264_2.png) [@chrisb](https://community.smartthings.com/u/chrisb)\
**Post date:** [October 28, 2013, 2:23pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/5 "2013-10-28T14:23:26Z")

</div>

Sorry @gopi2212, in this area I’m more of a BB-gun than a big gun!

Based on what PJ was saying above:

> Shoot, I did just notice in the info.txt of the smartthings libraries folder that on 2/8/2012 they “Began framework for working on Leonardo” but there’s no subsequent entry that it was finished. It seems that it’s unlikely the Leonardo will work after all? Bit disappointing if that’s the case since the arduino shield page specifies the Leonardo as working…

Might be the clue. I’d send an email to support and ask if the Leonardo is even supported.

---

<div class="post-metadata">

**Author:** ![twack](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/twack/32/18039_2.png) [@twack](https://community.smartthings.com/u/twack)\
**Post date:** [October 28, 2013, 2:37pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/6 "2013-10-28T14:37:49Z")

</div>

If I remember right there was hardware or software serial issue and there was/is a fix. Definitely send an email to [support@smartthings.com](mailto:support@smartthings.com).

Twack

---

<div class="post-metadata">

**Author:** ![snooginsguy](https://avatars.discourse-cdn.com/v4/letter/s/cab0a1/32.png) [@snooginsguy](https://community.smartthings.com/u/snooginsguy)\
**Post date:** [October 28, 2013, 3:21pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/7 "2013-10-28T15:21:53Z")

</div>

Thanks for the responses everyone! I’ll shoot an email to support, and will post back here with results, hopefully positive ones…

---

<div class="post-metadata">

**Author:** ![edevinney](https://avatars.discourse-cdn.com/v4/letter/e/ed8c4c/32.png) [@edevinney](https://community.smartthings.com/u/edevinney)\
**Post date:** [November 20, 2013, 9:22pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/8 "2013-11-20T21:22:20Z")

</div>

Any response? I’d also like to use the Leonardo I bought for my project rather than pirate an Uno from an older project…

---

<div class="post-metadata">

**Author:** ![twack](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/twack/32/18039_2.png) [@twack](https://community.smartthings.com/u/twack)\
**Post date:** [November 20, 2013, 11:18pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/9 "2013-11-20T23:18:57Z")

</div>

Did you read this?

[http://build.smartthings.com/forums/topic/arduino-mega-2560-and-thingshield-no-upload/](http://build.smartthings.com/forums/topic/arduino-mega-2560-and-thingshield-no-upload/)

---

<div class="post-metadata">

**Author:** ![edevinney](https://avatars.discourse-cdn.com/v4/letter/e/ed8c4c/32.png) [@edevinney](https://community.smartthings.com/u/edevinney)\
**Post date:** [November 22, 2013, 7:42pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/10 "2013-11-22T19:42:43Z")

</div>

Thanks, Twack - I did not read that as it seemed to be related to the Mega. Easy fix to use another pin, thanks for the pointer.

---

<div class="post-metadata">

**Author:** ![twack](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/twack/32/18039_2.png) [@twack](https://community.smartthings.com/u/twack)\
**Post date:** [November 22, 2013, 8:21pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/11 "2013-11-22T20:21:31Z")

</div>

Let us know if that worked for you. And no prob for the pointer, I like to share what little I know 🙂

---

<div class="post-metadata">

**Author:** ![edevinney](https://avatars.discourse-cdn.com/v4/letter/e/ed8c4c/32.png) [@edevinney](https://community.smartthings.com/u/edevinney)\
**Post date:** [November 22, 2013, 9:02pm UTC](https://community.smartthings.com/t/cant-figure-out-the-sm-shield-with-a-leonardo-arduino/813/12 "2013-11-22T21:02:38Z")

</div>

Yep, it did! My application is a controller for multiple strings of LEDs, driven by a 6-FET Sparkfun power shield. Fortunately I only need 4 control channels, as the power controller uses all 6 PWM pins and the ThingShield now wants two of them (3 and 10).
