# MangOH with sensor

**URL:** <https://mangoh.discourse.group/t/mangoh-with-sensor/650>\
**Category:** Uncategorized\
**Created:** [August 1, 2017, 8:34am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650 "2017-08-01T08:34:05Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![thtuan](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@thtuan](https://mangoh.discourse.group/u/thtuan)\
**Post date:** [August 1, 2017, 8:34am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/1 "2017-08-01T08:34:05Z")

</div>

I am newbie with mangOH. I want to develop an app that gets signal from sensor DS18B20 which uses 1-Wire technology and display to SSD1306 OLED. Is there reference working with 1-Wire library and OLED? Thanks.

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [August 1, 2017, 3:13pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/2 "2017-08-01T15:13:38Z")

</div>

I think @davidc may have used 1-wire in a demo he showed at the Sierra Wireless Innovation Summit this year. I think he visits the forum regularly, so hopefully he will show up and comment. I haven’t personally driven any 1-wire hardware from a mangOH board.

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://mangoh.discourse.group/u/davidc)\
**Post date:** [August 1, 2017, 10:34pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/3 "2017-08-01T22:34:35Z")

</div>

Hiya,

The GPIO on the mangOH IoT connector are not fast enough to directly control a Dallas/Maxim 1-wire device. For my demo a couple of years ago I built a prototype IoT card that had a I2C to 1-wire bridge chip on it and wrote some code to read multiple, parasite powered DS18x20 temperature sensors.

I didn’t think there was much interest in the IoT card so I didn’t go any further towards commercialising it.

What interface are you using for the SSD1306 display? I’ve used SPI and GPIOs to drive a black and white Nokia 5110 style display I got from Sparkfun. You could probably bolt this onto the end of one of my IoT breakout cards that are available from Linkwave ([http://ecommerce.linkwave.co.uk/iot-connector-i2c-spi-gpio-uart/](http://ecommerce.linkwave.co.uk/iot-connector-i2c-spi-gpio-uart/))

ciao, Dave

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [August 1, 2017, 10:53pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/4 "2017-08-01T22:53:31Z")

</div>

Thanks for the reply Dave. Another idea is that it may be possible to bit-bang the 1-wire protocol using the GPIO of the mt7697 chip on the mangOH Red.

---

<div class="post-metadata">

**Author:** ![thtuan](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@thtuan](https://mangoh.discourse.group/u/thtuan)\
**Post date:** [August 2, 2017, 2:54am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/5 "2017-08-02T02:54:15Z")

</div>

What I have is MangOH Green starter kit with a wifi IOT card. If there is no way to have mangoh green work with 1-wire sensor, can I look for I2C sensor connecting to breadboard to work with current kit?  
[http://www.newark.com/mangoh-io/mangoh-green-starter-kit/mangoh-green-starter-kit/dp/79Y9508](http://www.newark.com/mangoh-io/mangoh-green-starter-kit/mangoh-green-starter-kit/dp/79Y9508)

How about getting 1-wire sensor to Arduino then connect to MangOH board, is there special requirement for type of Arduino supported by MangOH Green?

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [August 2, 2017, 4:47am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/6 "2017-08-02T04:47:04Z")

</div>

> [@thtuan](#):
>
> How about getting 1-wire sensor to Arduino then connect to MangOH board, is there special requirement for type of Arduino supported by MangOH Green?

Yes, that should work with no issues. Any 1-wire that works on Arduino will work for mangoh.

---

<div class="post-metadata">

**Author:** ![thtuan](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@thtuan](https://mangoh.discourse.group/u/thtuan)\
**Post date:** [August 2, 2017, 6:27am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/7 "2017-08-02T06:27:12Z")

</div>

> [@asyal](#):
>
> Any 1-wire that works on Arduino will work for mangoh

Do I need Arduino on mangoh or connect 1-wire sensor directly to breakout card on mangoh?

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [August 2, 2017, 1:35pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/8 "2017-08-02T13:35:37Z")

</div>

You need Arduino on mangoh Green.

---

<div class="post-metadata">

**Author:** ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)\
**Post date:** [August 2, 2017, 3:20pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/9 "2017-08-02T15:20:21Z")

</div>

Specifically, look at sheet 15 of the [mangOH Green schematic](http://mangoh.io/uploaded-documents/Reference/mangOH%20Green/Hardware/Schematics/schematic_mangOH_Green_DV4_2500905.pdf) and you can see which of the ATmega32U4 I/Os are connected to the IOH and IOL header.

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://mangoh.discourse.group/u/davidc)\
**Post date:** [August 2, 2017, 10:51pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/10 "2017-08-02T22:51:51Z")

</div>

Hiya,

You can find tutorial about using the Arduino on the mangOH Green here: [https://www.littlesliceofmangoh.com/tutorials/UsingTheArduinoOnTheMangOHGreen-Pt1.html](https://www.littlesliceofmangoh.com/tutorials/UsingTheArduinoOnTheMangOHGreen-Pt1.html)

ciao, Dave

---

<div class="post-metadata">

**Author:** ![thtuan](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@thtuan](https://mangoh.discourse.group/u/thtuan)\
**Post date:** [August 7, 2017, 10:42am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/11 "2017-08-07T10:42:57Z")

</div>

Thanks for the reference link. Does it mean mangoh only supports Arduino Leonardo, not other type? I can get sensor work on Arduino Uno with ESP8266, still wait mangoh on shipment to my site.

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [August 7, 2017, 5:00pm UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/12 "2017-08-07T17:00:21Z")

</div>

If a sensor works on arduino uno, it should work on green

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://mangoh.discourse.group/u/davidc)\
**Post date:** [August 8, 2017, 2:03am UTC](https://mangoh.discourse.group/t/mangoh-with-sensor/650/13 "2017-08-08T02:03:45Z")

</div>

Hiya,

Yes, the hardware on the mangOH green is an Arduino Leonardo (Atmel Mega).

THat said, you should be able to get any of your Arduino code to run on the 'Green as long as you’re **NOT** using any processor specific options in your code.

ciao, Dave
