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 control a 5V output pin on STM32 Nucleo L4R5ZI remotely through a connected PC?

I have an STM32 Nucleo L4R5ZI, which is connected to a PC. The Nucleo is located in a place where I don't have direct access to it, so I can only control it through the connected PC. I need to stop the 5V output from one of its pins for 10 seconds, by any means necessary. I'm okay with restarting or shutting down the Nucleo if needed. However, I'm unsure how to achieve this. I've already attempted to cut power to the USB from the OS, but that didn’t work. I’m limited to making changes either in the code or the OS; I can't physically modify the Nucleo. How can I do this?...

What is the purpose of HAL_ADC_PollForConversion in STM32 HAL ADC code?

So I've been experimenting with the STM32 (F103RB) for a few weeks, but I'm unclear about the purpose of the HAL_ADC_PollForConversion function. It seems to have no effect on the ADC readings in my code. Here’s an example: The 1st (with PollForConversion): ```c...

What is the best ESP32 board and audio playback solution for a smart clock with NTP synchronization?

Hello guys I'm working on a compact ESP32 project to build a smart clock that fits inside a standard clock enclosure. I want to synchronize the time with NTP servers to ensure accurate timekeeping and play audio files, such as MP3 or WAV, at the top of every hour. The device should be small enough to fit inside a clock, making it a discreet addition to any room. I'm looking for suggestions on a suitable ESP32 board and audio playback solution that can handle my requirements. Additionally, I'd ap...

GUI interface for my project with Beaglebone Industrial

Hi I'm working in industrial automation controller. In that I have beaglebone industrial connected with TFT LCD display via HDMI. I used 3 push button to Control Interface. How to build Human Interface which is controlled by 3 push button which displayed in LCD display. Recommend some techniques or method to build this Interface #firmware-and-baremetal #middleware-and-os...

How to fix "Failed to initialize SD card -ENODEV" error on AVR128DA48 using SPI?

I'm working on logging pressure data to an SD card via the SPI interface on the AVR128DA48 microcontroller. However, I'm encountering an issue where the SD card fails to initialize. I have ensured the SD card is properly formatted and compatible with the system, and also verified the SPI wiring and connection to the SD card module, but I'm still facing the Failed to initialize SD card -ENODEV error. how can I overcome this and log the pressure data? this is my instruction snippet: ``` #include <zephyr.h> #include <device.h>...

Why does my NMI handler address end with a 0, but the vector address ends with a 1?

Happy Sunday guys, I am working with an STM32-F49ZI Nucleo board, which features an ARM Cortex-M4 32-bit MCU. I am using GCC as my compiler and GCC linker. For debugging, I am using OpenOCD and I inspected the addresses through the memory window in the debugger I have written my own NMI handler function, NMI_Handler, and when I inspect its address in the debugger, I see that it ends with a 0. However, the vector address for the NMI handler contains the same address, but the last bit is set to 1. I understand that this might be related to the ARM Cortex-M4’s support for Thumb instructions (which are 16-bit), but I'm having trouble understanding why the last bit is set to 1. ...
Solution:
The last bit of the vector address is set to 1 to indicate that the handler uses Thumb instructions. When the processor jumps to the handler, it automatically clears this bit to get the actual function address, Cortex-M processors always operate in Thumb mode.

Why isn't my LED responding to pressure readings in AVR128DA48 project?

hey guys, In my ongoing project on real-time pressure monitoring using the AVR128DA48 microcontroller, I’ve set up an alert system that triggers an LED to blink when the pressure exceeds a certain threshold. However, the LED doesn't seem to respond correctly to the pressure values, I have tested the LED separately to ensure it is functioning, verified that the BMP280 sensor is returning valid pressure readings, and also checked the GPIO pin configuration for the LED, yet still fails to respond correctly to the pressure readings, even when the threshold is crossed. this is my code below: ``` #include <zephyr.h> #include <device.h>...
Solution:
Yea thankz @Marvee Amasi I checked the issue was coming from my comparison of the pressure values...I had to use a single unit for it, both for the integer and fractional values..thanks for pointing out

How to resolve board restarting issue on LilyGO TTGO LoRa32 (T3 V1.6.1)?

Hii , I have a problem with my LilyGO TTGO OLED LoRa32 board. Board reference: T3 V1.6.1 Pinout:...
attachment 0

Which MicroPython libraries should I use for ECG with ESP32?

Hello everyone, I'm trying to make ECG using esp32 with micropython, I need help to find the libraries to use in code.

How can I resolve I2C transfer failure on AVR128DA48 with BMP280 sensor in Zephyr OS?

Hello guys, I'm working on a real-time pressure monitoring system for industrial automation using the AVR128DA48 microcontroller and Zephyr OS. I'm interfacing a BMP280 pressure sensor via I2C, but I'm encountering an error during communication. The I2C wiring and connections between the BMP280 sensor and AVR128DA48 are verified to be ok, I double-checked the BMP280 sensor's I2C address (0x76), and updated the device tree for correct I2C configuration in Zephyr OS. yet still having this issue I2C transfer failed with error code -EIO making it unable to establish successful I2C communication with the BMP280 sensor. who has an idea of how I can reslove it? this is my code: ```#include <zephyr.h> #include <device.h>...
Solution:
hey buddy @Dtynin try updating I2C device binding, with the following supposedly #define I2C_DEV DT_LABEL(DT_NODELABEL(i2c0))

Segmentation Fault in C Function Printing Double from Assembly Code

I'm encountering a segmentation fault while calling a C function from assembly code to print floating point values. The C function employs a switch statement to handle different data types, including doubles. Been able to confirm that the issue lies within the printf function when handling double values, as converting the double to an integer before printing works correctly. But directly printing the double using %f results in a segmentation fault. I'm running this on a 64 bit system (Ubuntu 22.04) and the GCC compiler. Any insights into resolving this issue ?...
attachment 0

Automatically Start Obstacle Detection System on BeagleBone Black at Boot

still based on myquestion on developing an obstacle detection system using a BeagleBone Black running Embedded Linux using HC-SR04 ultrasonic sensor to measure distances and displays the measurements on a 16x2 LCD screen, how do i ensure my obstacle detection system starts automatically when the BeagleBone Black boots up
Solution:
To start your obstacle detection system automatically on BeagleBone Black boot-up: 1. Create a systemd service file (obstacle_detection.service) in /etc/systemd/system/ 2. Enable the service: sudo systemctl enable obstacle_detection.service 3. Start the service: sudo systemctl start obstacle_detection.service...

LCD Screen Remains Blank on BeagleBone Black with HC-SR04 Ultrasonic Sensor

hello guys, based on my previous question on developing an obstacle detection system using a BeagleBone Black running Embedded Linux using HC-SR04 ultrasonic sensor to measure distances and displays the measurements on a 16x2 LCD screen. am encoutering a situation where the LCD screen remains blank and does not display any readings, and i have verified the lcd is powered correctly, i have also checked lcd initialization
python
lcd = CharLCD(pin_rs=LCD_RS, pin_e=LCD_E, pins_data=[LCD_D4, LCD_D5, LCD_D6, LCD_D7], numbering_mode=GPIO.BOARD)
python
lcd = CharLCD(pin_rs=LCD_RS, pin_e=LCD_E, pins_data=[LCD_D4, LCD_D5, LCD_D6, LCD_D7], numbering_mode=GPIO.BOARD)
but still my lcd screen remains blank...

Configuring USB CDC Rx Interrupt for STM32-F446RE (Nucleo)

I am seeking guidance on configuring a USB CDC Rx interrupt to handle data reception for the STM32-F446RE (Nucleo). At present, I utilize int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len) in a loop to receive incoming data. However, due to the transmission of substantial amounts of data, an interrupt-based reception technique is necessary. Any assistance or advice would be highly appreciated.
Solution:
Hey @Sterling The function is a callback that is already being called in an interrupt context by the USB stack. You should not be calling it in a loop....

How to Display Warnings on OLED Based on Object Distance Using BeagleBone Black?

Hey guys, still based on my project parking assistance system using a BeagleBone Black running Embedded Linux, VL53L0X time of flight distance sensor to detect the distance to nearby objects and a 0.96-inch OLED display to show the distance and warning messages. how can I display warning messages on the OLED screen when the detected object is too close or too far. i am getting the error Error: Display not updating i have verified timing of the time.sleep() function, ensured proper buffer clearing with disp.clear() but still getting same error. here's my code...
Solution:
Hey @Boss lady It looks like you’ve got most things set up correctly. The issue with the display not updating is due to how the text is being rendered on the OLED screen, you could try making sure that each frame is being drawn correctly before it’s sent to the display. The Adafruit_SSD1306 library has some quirks with the text() method, and sometimes it doesn't update the display as expected. So try modifying your code to use the Image and ImageDraw modules to draw the text on...

How can I use Assisted GPS for faster first-time fix in my GPS tracking system?

Hi everyone , im working on a gps tracking system for study graduation . I just need a help about using a feature named « Assisted Gps » to get a very fast first time fix . I hope that someone can help me please !

I need a circuit to download the firmware inside esp32 and the pin used.

Hi I need a circuit to download the firmware inside esp32 and the pin used....
Solution:
To automate firmware downloads on your ESP32 using an FTDI module, connect the FTDI's DTR to the ESP32's EN (Enable) pin, and RTS to GPIO0 (BOOT), each through a 0.1 µF capacitor. This setup allows the flashing tool to automatically reset the ESP32 and enter flash mode without any manual button presses.

Which ESP32 board is best for a home automation hub with predictive maintenance and fault detection?

Hey guys i’m working on an ESP32-based home automation hub that includes predictive maintenance and fault detection. The setup uses FreeRTOS for managing tasks, MQTT for real-time communication, and sensors for temperature, humidity, motion, and power monitoring. The system will have around 10-15 sensors collecting data at varying frequencies, with a desired response time of 1-2 seconds. Considering the number of sensors and the need for reliable communication and processing, which ESP32 board w...
Solution:
@Daniel kalu The ESP32-WROOM-32 or ESP32-WROVER would work well for your project. If you need extra memory for handling multiple tasks and MQTT communication, the WROVER is ideal with its additional PSRAM. Keep an eye on memory, Wi-Fi connectivity, and processing power to ensure your system runs smoothly. The WROVER’s extra memory offers more flexibility if your project grows.

Why isn't my ADC with DMA setup updating the variable correctly on the STM32F407ZGT6?

I'm attempting to run through two ADC channels sequentially on my STM32F407ZGT6 using DMA to capture values from two independent potentiometers, one on each channel. The program doesn't crash, but the variable sensor_val isn't being updated as I would desire. I'm making use of the DMA2_Stream0 with Channel 0 for ADC1, and my ADC1 is configured to read from PB1 (channel 9) and PA1 (channel 1). I followed a tutorial closely but avoided triggering the ADC with a timer for now. I've also referenced an example related to this issue. However, my ADC callback isn't being invoked. Based on my understanding, the expected sequence should be: ADC1->SR EOC --> ADC->CR1 EOCIE --> DMA2_Stream0_IRQHandler() --> dma_ADC_callback()...
Solution:
To fix your ADC issue, ensure the ADC is properly configured for multi-channel conversion, and verify that the DMA is correctly set up to transfer data to sensor_val. Check that the DMA callback is linked to the interrupt handler and that interrupt's are enabled. If you're not using a timer, make sure the ADC starts conversions automatically. Finally, use debugging tools to confirm that the callback is triggering and data is being transferred as expected.

Continuous Distance Measurement and OLED Update on BeagleBone Black with VL53L0X

Hello guys, based on my project parking assistance system using a BeagleBone Black running Embedded Linux, VL53L0X time of flight distance sensor to detect the distance to nearby objects and a 0.96-inch OLED display to show the distance and warning messages. how do I continuously measure the distance using the VL53L0X sensor and update the OLED display with the readings? I have added debug prints, checked for memory issues, ensured proper handling of the OLED display but am getting the error prompt Error: ValueError: I/O operation on closed file here's my code ```python...
Solution:
Hello,Your setup is okay, but the ValueError: I/O operation on closed file error seems to points to an issue with how the OLED display or I2C bus is being managed. Make sure the OLED is properly initialized and stays active. You might also want to wrap your loop in a try-except block to catch errors and prevent the display from closing unexpectedly. re-check your wiring as well. Here's a quick fix: ```python try: while True:...