Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Download:

Datei 1: esp32_Puls_LCD.ino

 

 

Problem:

in an Arduino calculation of a float variable (flow number, comma value), the result is always calculated without decimal places.

The calculation varFloat=1000/myFloat1 always yields 0.00

 

Solution:

In the case of calculation operations, you have to specify the fixed numbers with a point as a float.

Example: instead of 1000 you specify 1000.0

 

OK:

Output is 0.75 MHz

  float frequency= float1000.0 / nsPulswidth );

 

 

 

False:

Output is 0.00 MHz

  float frequency= float1000 / nsPulswidth );

 

 

Arduino ESP32

 

Mobile

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de