DevHeads IoT Integration Server

DII

DevHeads IoT Integration Server

The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.

Join

seeking-collabs

🪲-firmware-and-baremetal

📦-middleware-and-os

📡-edge-networking

🟩-pcb-and-analog

jobs

☁-iot-cloud

✅-code-review

devheads-feed

general-dev-chat

How to Fix "Failed to Read Sensor" Error on ESP32 with DHT22 in MicroPython?

Hey guys @Middleware & OS am building a Temperature and Humidity Monitoring System with ESP32 and DHT22 Sensor Using MicroPython, my aim is to create a temperature and humidity monitoring system using an ESP32 microcontroller and a DHT22(Temperature and humidity) sensor, read temperature and humidity data from the DHT22 sensor, display the data on the serial monitor and update the readings every 2 seconds. But i keep getting the error failed to read sensor here's my code ...
Solution:
Also could you check with a logic analyzer if the Data in pin is always high cuz If signal from DHT22 is always high-voltage-level, it means DHT22 is not working properly, please check the electrical connection status....
attachment 0

How to Fix Interrupt-Driven Data Acquisition Issues with MCP9808 on ATmega2560 and Zephyr OS?

hey guys, who knows how I can implement interrupt-driven data acquisition from the MCP9808 sensor using an ATmega2560 and Zephyr OS, and resolve the interrupt not triggering error? I have tried setting up the external interrupt for the MCP9808 sensor and configuring the ISR to read sensor data, but I still encountered the issue of the interrupt not triggering. Here's the code: ```c #include <zephyr.h>...

LD_PRELOAD Not Working with Custom getpid Function

I'm trying to use the LD_PRELOAD to inject my custom function in a program. I've compiled a shared library getpid.so having a modified getpid function that prints a message:``` #include <sys/syscall.h> #include <sys/types.h> #include <unistd.h> #include <stdio.h>...
Solution:
Hi! @Marvee Amasi One common issue with LD_PRELOAD is that the shared library must be compiled with position-independent code (PIC). Make sure you compiled getpid.so with the -fPIC flag. Also, check that getpid.so is in the current directory when you run the LD_PRELOAD command. Try running ldd getpid.so to check if there are any missing dependencies.

How can I resolve the SD card initialization error?

Hey guys, I'm still having issues trying to log temperature data from the MCP9808 sensor to an SD card using an ATmega2560 and Zephyr OS, how can I resolve the SD card initialization error? Despite setting up the SD card interface and implementing file write operations, I still encountered the error "Failed to mount SD card." Here's the code: ```c #include <zephyr.h> #include <fs/fs.h>...
Solution:
Yeah, @RED HAT I had to verify my file system configuration in Zephyr after which I ensured to recheck the file system permissions...and a little run arounds😂 . thanks anyways

Establishing HTTP Connection for Real-Time Temperature Monitoring with ATmega2560, MCP9808, Zephyr

I'm building a real-time temperature monitoring system with an ATmega2560 microcontroller, MCP9808 sensor, and Zephyr OS. My goal is to send temperature data to a server via HTTP, but I'm unable to establish a connection. The network interface is configured in Zephyr, and a basic HTTP client is implemented to transmit data. The code creates a socket, attempts to connect to the server (IP: 192.168.1.100, port 80), and send "Temperature data", but it fails with errors: "Failed to create socket." I've used Zephyr's logging module for error handling. Any suggestions to resolve this issue would be appreciated! this is my code snippet: ```#include <zephyr.h> #include <net/socket.h> #include <logging/log.h>...
Solution:
The error message “Failed to create socket” indicates that there’s a problem with socket creation

Troubleshooting OSError with DHT22 Sensor in ESP32 MicroPython Real-Time Control System

Hi guys @Middleware & OS , am developing a real-time control system using an ESP32, MicroPython, and an ML model to predict temperature based on sensor(DHT22) readings, and integrate it with a relay to control a heating element. I have setup flash MicroPython firmware on the ESP32, connected the DHT22 sensor to the ESP32 (data pin to GPIO 4), connected the relay module to control the heating element (relay input to GPIO 5). But am getting the error Failed to read sensor: OSError ...
Solution:
Since esp32 comes in different pin layout you can try debugging by adding a led to the pin 5 and try to blink it
attachment 0

Debugging Techniques for FreeRTOS on ESP32 in Real-Time Sensor Monitoring Applications

Hey guys I'm developing a real-time application using FreeRTOS on ESP32 to monitor temperature and humidity sensors. The system is experiencing frequent crashes and unpredictable behavior, especially when multiple sensors are being read simultaneously. I suspect improper task synchronization and memory allocation might be the culprits. I've followed the FreeRTOS documentation for task creation and scheduling, but sensor data seems to be missed occasionally, and control commands sometimes fail to execute. Are there any advanced debugging techniques or tools specifically designed for FreeRTOS on ESP32 that can help identify and resolve these issues more effectively? I'd appreciate any guidance on ensuring proper memory allocation and management within a multitasking environment to avoid stack overflows and heap fragmentation @Middleware & OS...
Solution:
Perhaps you need to step back and look at your priorties, threads and critical sections if any. In any case you are trying to fix too much at once. Pick one then the next I would say.

Transitioning from Artix 7 to Zynq SoC for Image Processing and Storage

I've been using FPGAs such as the Artix 7 to read the image data from peripherals and do processing, then display some output using LCD displays connected to FPGA I/O ports. I'd like to transition to using Zynq SoC boards in order to store that processed image data using on-board RAM, and also making that image data accessible to the arm core (both directly from the FPGA and the RAM). I think this involves creating a custom linux build that runs on the arm, something with AXI, then creating an application in C on the arm side....
Solution:
If you want your FPGA to write data to the RAM memory of the processor system, then your FPGA must implement the DMA engine.
It can be easily done with HLS (see https://docs.amd.com/r/en-US/ug1399-vitis-hls/AXI4-Master-Interface and https://github.com/Xilinx/Vitis-HLS-Introductory-Examples/blob/master/Interface/Memory/using\_axi\_master/example.cpp ). In HDL it is more complicated.
If you want to know more, you may read http://www.zynqbook.com/....

Issue with 4-Dimensional Input Error in PyTorch Model Inference

Hello everyone, I'm working on an object recognition project using PyTorch in Python, and I'm encountering an issue with model inference. After successfully training my model, I'm getting an error during inference: Error: RuntimeError: Expected 4-dimensional input for 4-dimensional weight [32, 3, 3, 3], but got 3-dimensional input of size [3, 224, 224] instead. I'm using a pre-trained ResNet model and passing in images of size 224x224 pixels. Any ideas on why this error is occurring and how I can resolve it? Your insights would be much appreciated...
Solution:
Hi @wafa_ath see what's happening here ur images prolly is coming in as single tensors of size (224, 224, 3) for RGB channels, so the model expects an extra dimension at the beginning to represent the batch size. Reshape your image or instead add a batch dimension of size 1

How to fix this error ?

how to fix this error ?
attachment 0

Understanding Coding and Libraries in STM32CubeIDE

Hey guys i recently completed mastering arduino , esp32 and all different types of atmega328 boards . Even completed learning embedded C and its application on atmega32 . I want to get started in STM32 . I have spend few weeks learning about its ide but the coding part is too much confusing , till now i am able to just use HAL Library and writing a embedded c code (target type - empty ) for it from scratch . But I am looking forward on understanding the coding part of the STM32 cube ide like ho...
Solution:
it's definitely possible yes

Trouble Installing ia32-libs on Debian 12 for Running 32-bit Application

I am trying to install ia32-libs on my Debian 12 system to run a 32-bit application. I've tried the following commands: ``` sudo dpkg --add-architecture i386 sudo apt update sudo apt install ia32-libs...
Solution:
I think the ia32-libs is no longer supported. If you know what libs you actually need, you can then try sudo apt-get install <lib>:386, e.g. for libc6 sudo apt-get install libc6:386...

Error Loading TensorFlow Model: 'DecodeWav' Op Type Not Registered

Hello everyone, I'm currently working on an object recognition project in Python using the TensorFlow library. I've encountered an issue while trying to load my trained model for inference. The specific error message I'm receiving is: Error: Unable to load model. InvalidArgumentError: Op type not registered 'DecodeWav' I've checked my TensorFlow installation and everything seems fine. Has anyone else faced this problem before, or does anyone have suggestions on how to resolve this issue with the 'DecodeWav' operation? Any insights would be highly appreciated @Middleware & OS...

How do I convert a Keras model to TensorFlow Lite format?

Hello @everyone @Middleware & OS How do I convert a Keras model to TensorFlow Lite format for running on a microcontroller using TensorFlow Lite for Microcontrollers?...
Solution:
Hey man @Enthernet Code it's few things I would want you to do , firstly you have to export to tensor flow by saving your keras model as a tensor flow saved model or frozen Graph

Is Integrating a DLA with a RISC-V Processor a Worthy FYP?

Hi,Devs @Middleware & OS I am currently working on a new project. The project entails how to integrate a DLA and a RISC V processor. However, I have some doubts with this. The DLA is an open source project with everything already made including the UMD, KMD and compiler ready to use. And my project is to simply integrate it with RISC V and port some algorithm on it. ...

Is there a method for creating a new empty directory in the root filesystem in BitBake?

Lest I forget guys @Middleware & OS, Is there a specific method for creating a new, empty directory in the root filesystem in BitBake? I attempted to include this in one of my bbappend files: ``` do_install() { install -d ${D}/tmp/myNewDir }...
Solution:
First - if you are using an append file, then you may want to try changing do_install() { to do_install:append() { Then, that failed my QA checks (on Kirkstone) because the package installs files in /tmp, but it is expected to be empty [empty-dirs] . However, changing the location of the empty directory to somewhere else worked fine...

Why can't my AVR microcontroller running Zephyr connect to a remote server using TCP?

hey guys, I'm trying to send log data to a remote server using TCP on my AVR microcontroller running Zephyr. Despite setting up the network interface and writing the TCP client code, I can't establish a connection to the server. so far I have configured the network interface in prj.conf, and also implemented the TCP client to connect and send data. Code Snippet: ```c...

How can I create a Zephyr project with MCUboot and a blinky app on STM32F103C8T6?

Hi i have to create an example project using MCUBOOT and a blinky app on zephyr using stm32f103c8t6... I tried follow through the documentation of mcuBoot but have no success. Im new to zypher and MCUboot and dont exactly now which IDE to use for now im using terminal to build and flash the files using west. I be able to flash both the bootlooder as mcu boot and blinky app but it didn't work. ...

Why isn't my nRF52840 dongle or ESP32-S3 connecting using Zephyr OS peripheral_hids sample?

Hello @Middleware & OS, I have a nrf52840dongle and a esp32s3devkitc i tried using zephyr OS peripherals_hids(https://docs.zephyrproject.org/latest/samples/bluetooth/peripheral_hids/README.html) sample, but for some reason, it doesnt seem to connect to either my laptop or phone Are there any possible ways to check, what is the exact issue for which the connection is not being formed...

What are all the procedure to commercialize my product which is made by ESP32 controller?

@everyone @FW Lead @HW-Lead @MCU, MPU & Firmware
Seeking for an advice I designed custom PCB board and written a custom ESP-IDF framework code. Is there any compliance certificates required to move into production?. What's the best method to move into product after an final product development...