Questions tagged [c++]

C++ is a compiled general-purpose programming language that adds object-oriented features and other enhancements to the C language, which it is largely a superset of. It is popular for both embedded and PC software development.

43 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
1 answer
118 views

Is LTC2485 Arduino library missing information?

I'm using LTC2485 and got confused by the provided software code vs. the datasheet. As described in LTC2485 I2C Data Format the LTC2485 ADC is 24 bits + sign ADC so like 25 bits. In the given software ...
ThomLB's user avatar
  • 51
2 votes
0 answers
303 views

Reading 2 digit 7 segments with ESP32 using TM1650 maybe?

I have been trying to contact a forum member that has done a modification to his pool equipment in order to control it remotely instead of having to go to the box every time and check on the codes. ...
StealthRT's user avatar
  • 743
2 votes
0 answers
209 views

Designing implementation-inspecific PIC32MZ communication classes in C++

Alright everyone, that title may seem like a significant amount of technobabble, so let me explain what I'm trying to do. I'm starting to break into the PIC32 family, specifically the PIC32MZ series, ...
ecfedele's user avatar
  • 617
1 vote
0 answers
1k views

Set brightness of flash lamp/LED with an ESP32

This sketch is to turn on and turn off an LED flash (torch) on board ESP32S camera periodically ...
Muhammad Ikhwan Perwira's user avatar
1 vote
0 answers
72 views

ESP8266 D1 mini pro/ Arduino IOT, no function is getting called

I coded this: ...
KaffeMitMilf's user avatar
1 vote
0 answers
476 views

How to convert raw ADC value into voltage in volts in software?

Let's say I have a microcontroller with an ADC and my goal is to measure instantaneous values of the line to line voltage of the three phase grid 400 V/50 Hz. I have a voltage instrument transformer ...
Professor Jimatura's user avatar
1 vote
0 answers
557 views

SIM7020G nb-iot module interface with esp32

My code at the moment is to connect esp32 to MQTT server via wifi and its working completely fine. The next step is to use sim7020G NB-IOT module to achieve the same connection but as I have never ...
Zohair's user avatar
  • 21
1 vote
0 answers
166 views

UART Issues with MCP39F511

I've been trying to debug a UART communication issue on a custom design based on ADM00667 development board where there are only a few minor changes. I have the dev kit hooked up to an nRF52840 BLT ...
Jiggly's user avatar
  • 80
1 vote
0 answers
690 views

Which library to use for FT232H, libMPSSE vs libFTDI or something else?

I have an FT232H chip, which supports a max SPI speed of 30 Mhz, I am interested in writing a library which uses the maximum speed of FT232H. And control 4-5 GPIO pins at the same time. I have come ...
sandeepzgk's user avatar
1 vote
0 answers
3k views

reading data stream from usb bulk endpoint using libusb

I’m writing a program to read and write data to a usb device. Right now I don’t have the device so I’m using a loop board just to write the software. When I’ll get the actual device I will need to ...
user14092875's user avatar
1 vote
0 answers
511 views

Modifying Option Bytes at compile time

I need to modify the option bytes at compile time for STM32L0xx controller and generate the binaries i.e. .hex, .bin. could you please suggest a solution for the same. I amusing STM32Cube IDE for ...
delve123's user avatar
1 vote
0 answers
805 views

STM32F407VG DISCOVERY BOARD micro controller CAN messages

I am wondering if anyone is familiar with any STM32f407VG micro-controllers? If so, I am having some problems configuring a CAN driver. I can run the demo code, which is set to a loop-back mode, but ...
Naveenreddy's user avatar
1 vote
0 answers
3k views

Cannot send SMS with SIM900 GSM module

I have a little problem using GSM SIM900 module connected to the Arduino the call is working alright but it doesn't send me SMS I don't know why. This is my code: ...
omarrageh rageh's user avatar
1 vote
0 answers
517 views

No output for C++ GPIO code for Beaglebone Black

Could anyone tell what could possibly be wrong in the following C++ code for enabling and setting pin no 49 (p9_23). I am directly checking the output on multimeter. ...
Kartik Madhira's user avatar
1 vote
0 answers
628 views

Receiving and decoding Manchester code X10

Solved: After much debugging I found out that it was the UART that was not working correctly (not sure why yet) and that port I used to turn on LEDs did not work (PORTC). So there were never any ...
Mikkel Poulsen's user avatar
1 vote
0 answers
357 views

STM32 F205VCT6: GPIO B Port 6 and 7 do not work?

I'm using the STM32 F205VCT6. I have a simple blinking LED program written in C++ with VisualGDB (and VS 2013 Community). It works fine for pins like A1 and E2, but it doesn't for B6 and B7, where I ...
user2462898's user avatar
1 vote
0 answers
1k views

Should I inherit from Arduino's Stream or Print when I'm using write?

I'm submitting a pull request to an Arduino library and want to make sure I'm doing the right thing before I send it. The change allows the dumping of data somewhere other than into a string buffer (...
Mark Cheverton's user avatar
0 votes
1 answer
90 views

Fake content in serialized array

I have network structures and a container structure (nvs) that holds the number of networks and a pointer chain for each network. I would like to serialize this container and then store it in Non ...
Franziee's user avatar
  • 101
0 votes
0 answers
85 views

How do I control the brightness of a TFT LCD through SPI (No Backlight Pin)

I recently purchased a TFT LCD (GMT020-02 VER1.1) The screen uses the ST7789V LED Driver and does not include a backlight control pin, So Originally I though that it was impossible to control it (i.e ...
Trippy 741's user avatar
0 votes
0 answers
66 views

Losing external EEPROM data after power Cycles on ESP32

Sending "1" starts the write operation into the eeprom every 1 second to the next available address, and sending "2" starts reading the written values into the eeprom. When there's ...
walid Bmd's user avatar
0 votes
0 answers
188 views

Printf retarget on STM32 with CubeMX

I'm using STM32F7xx for my project where I use VS Code text editor in combination with CMake project build. I also use CubeMX for code generation. For a record I have already examined all the answers ...
lucenzo97's user avatar
  • 2,430
0 votes
0 answers
132 views

Array not initialized properly in STM32Cube IDE

I have a function conv 2D , that takes in 4D and 1D vectors as inputs (inputs, weights,outputs and biases) along with size parameters which are int (filter height, width etc). The function directly ...
satan 29's user avatar
  • 189
0 votes
0 answers
109 views

Pixel offset in image from FLIR Lepton 3.5 VoSPI

I´m working on my driver for a FLIR Lepton 3.5 thermal imaging sensor attached to an ESP32-S3I want to display the image on an LCD, but the image contains line offsets. I use the following settings ...
Kampi's user avatar
  • 422
0 votes
1 answer
35 views

How to code process_state variable which reruns each time process commences?

I am making a bottle filling machine. I am using the YF-S201 water flow sensor to do the same and a 600ltr/min pump. While according to the sensor datasheet I should get the 750ml at 369 pulses, but ...
tiktok's user avatar
  • 127
0 votes
1 answer
52 views

vivado HLS or SDsoc for use openCV

I want to do an image processing by openCV on FPGA . But I do not know if I should use the SDsoc method or the vivadoHLS method. The size of the images I am going to process is large and I want to ...
tom's user avatar
  • 1
0 votes
0 answers
1k views

Raspberry Pi Pico: Hardware UART Tx not working

I recently got a Raspberry Pi Pico as an evaluation board for the RP2040. When I tried to use hardware UART, I found that it would not send data. To find out what was going on, I used an LED on the Tx ...
A Person's user avatar
0 votes
0 answers
107 views

Making sense of an architecture for a FreeRTOS based application

This is more of an architectural design question and any suggestions shall be appreciated. So far, a general idea is that there's a system thread that's like a central task that decides how to ...
Jazzy's user avatar
  • 137
0 votes
0 answers
54 views

Object's members' values change as soon as interrupt is fired

I have a UART class that has instances of Fifo. What I notice is as soon as the UART IRQ handler is fired, the member variables of ...
Jazzy's user avatar
  • 137
0 votes
0 answers
204 views

Interrupt handler starts behaving unexpectedly when scheduler runs

I have an IRQ handler that gets fired upon receiving a character over serial, and everything is fine until I run a FreeRTOS scheduler inside main, and now what I see is IRQ handler still getting ...
Jazzy's user avatar
  • 137
0 votes
0 answers
58 views

Lora sx1278 implementation by Arduino Uno

I'm implementing a Lora network, with two SX1278 modules and Arduino Uno. Lora is based on three classes. A , B and C, The question is : for change For example A to B, what should exactly change in ...
sajad ahmadi's user avatar
0 votes
0 answers
69 views

PID Control: Is adding a delay before the next loop a good idea?

I am implementing PID control in c++ to make a differential drive robot turn an accurate number of degrees, but I am having many issues. Exiting control loop early due to fast loop runtime If the ...
droiddoes9's user avatar
0 votes
0 answers
313 views

How to implement `analogRead` (Arduino) on AVR?

I'm trying to implement Pin class in C++ with digitalRead, digitalWrite, ...
manueld4722623's user avatar
0 votes
0 answers
58 views

Wierd LSM303DLHC magnetometer output

I'm kind of new to electronic and recently bought a Adafruit 9DOF Sensor. I use it with a Raspberry Pi Zero connected through I²C and when I try to read the Z-axis magnetic field data of the ...
pimink's user avatar
  • 1
0 votes
0 answers
343 views

How can I get SPI SCK line to idle low without wasting current with a pulldown resistor?

I am using the STM32L475 MCU and am using SPI to communicate with an SD card. When I configure the SPI SCK GPIO pin, I configure it as Alternate Function SPI in PushPull mode. I set the ClockPolarity ...
riley lyman's user avatar
0 votes
0 answers
81 views

Will the following ATSAMD21 series code properly configure SysTick interrupt?

I haven't seen any examples of registering ISRs in Atmel Studio 7, but I've given the following code a go in my IDE. ...
tuskiomi's user avatar
  • 667
0 votes
0 answers
226 views

Cannot use SoftwareSerial and RS485 protocol in the same code

Could someone help me ? I want to make 5 nanos communicating through RS485 protocol with my Arduino Uno master. This part is working great by using the code of http://www.gammon.com.au/forum/?id=...
FrancNovation's user avatar
0 votes
0 answers
309 views

WS2811 flicker to random colors when trying to turn them all off in a 3x3 array

I am trying to do more, but for starters, I am trying to write code to turn all of my WS2811 off that exist in a 3x3 array. Currently, when I run my Arduino project, they are flickering from red, to ...
hippoman's user avatar
0 votes
0 answers
81 views

BLE Nano I2C on P0_10

I have a project where an nRF51822 (BLE Nano v1.5) is an I2C master and communicates with an Atmega328. I have communication working over I2C just fine using various pins. However, when attempting to ...
amitchone's user avatar
  • 305
0 votes
1 answer
1k views

How to fix the error "Response code 0" to get "Response code 202" to bulk update a thingspeak channel?

I am using this example: https://www.mathworks.com/help/thingspeak/continuously-collect-data-and-bulk-update-a-thingspeak-channel-using-an-arduino-mkr1000-board-or-an-esp8266-board.html According to ...
Ahmed 's user avatar
0 votes
0 answers
604 views

libmodbus modbus_read_bits() returns illegal function

It is all okay when it comes to read registers with: modbus_read_registers(ctx,0,32,destination); It gives me values of 32 different registers. But when it comes ...
user avatar
0 votes
0 answers
58 views

XBee | Ubuntu (C/C++) | Android

I am looking for guidance of wireless communication between Ubuntu (code written in C/C++) with an Android device. Since the desired range is about 1 mile (~1.5 km), I assume that XBee Pro would be a ...
user avatar
-1 votes
1 answer
398 views

How to repeat a task every X ms on STM32F303VCT6 (C++) using timers/interrupts?

My aim is to do the following: 1- Repeat a task every 250ms and when the button is pressed the task is repeated every 500ms, and if the button is pressed again go back to every 250ms. 2- I plan on ...
Electrical_engineer_student's user avatar
-1 votes
1 answer
4k views

How to post multiple values to ThingSpeak?

I am able to store and access data in internal memory of RTC ESP8266 thing dev board. Now I am trying to loop the data stored in internal memory and post data to ThingSpeak. However, I am only able to ...
Ahmed 's user avatar