# Need Some Advise with Integrating Sensor Data with Ameba IoT

**URL:** <https://forum.amebaiot.com/t/need-some-advise-with-integrating-sensor-data-with-ameba-iot/3065>\
**Category:** Peripherals\
**Tags:** rtl872xd, evb-amb82\
**Created:** [June 27, 2024, 9:36am UTC](https://forum.amebaiot.com/t/need-some-advise-with-integrating-sensor-data-with-ameba-iot/3065 "2024-06-27T09:36:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elijaa](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.amebaiot.com/elijaa/32/2137_2.png) [@elijaa](https://forum.amebaiot.com/u/elijaa)\
**Post date:** [June 27, 2024, 9:36am UTC](https://forum.amebaiot.com/t/need-some-advise-with-integrating-sensor-data-with-ameba-iot/3065/1 "2024-06-27T09:36:57Z")

</div>

Hello there,

I am working on a project where I need to integrate sensor data with an Ameba IoT board; and I am hoping to get some advice from this knowledgeable community.

I m using an Ameba RTL8722DM board to collect environmental data from a suite of sensors including temperature; humidity; and air quality sensors.

The goal is to send this data to a cloud server for real-time monitoring and analysis. I have chosen the Ameba board for its versatility and the rich set of libraries it offers; but I am running into a few issues.

DHT22 for temperature and humidity, MQ135 for air quality  
RTL8722DM  
I2C for the DHT22; Analog input for the MQ135  
AWS IoT Core

I am having trouble getting consistent readings from the DHT22 sensor. The values fluctuate significantly and sometimes don’t register at all. Has anyone faced similar issues or could suggest troubleshooting steps?

I am using the Ameba IoT MQTT library to send data to AWS IoT Core. Although, I am experiencing frequent disconnects. Is there a more reliable way to maintain a stable connection; or are there specific settings I should adjust? 🤔

My current code seems to be running inefficiently, leading to occasional lags and delays. Any tips on optimizing code for better performance on the Ameba board?

Also, I have gone through this post; [https://www.amebaiot.com/en/amebad-](https://www.amebaiot.com/en/amebad-mini-arduino-getting-started/)[minitab](https://www.igmguru.com/quality-management/minitab-online-training/)[-arduino-getting-started/](https://www.amebaiot.com/en/amebad-mini-arduino-getting-started/) which definitely helped me out a lot.

Are there any alternative sensors that work particularly well with the Ameba RTL8722DM board?

Has anyone implemented a similar project and could share their experience or code snippets?

Thanks in advance for your help and assistance. 😇
