[ Log In ]

16x2 LCD (Liquid Crystal Display)

16x2 LCD (Liquid Crystal Display)

Front of the 128x64 display module

128x64 OLED Display Yel/Blu

USB 2.0 Cable 10 Foot Type A Male to Type B Male

USB 2.0 Cable Type A Male to Type B Male - 10 FT

Multimeter Security Banana Plug To Test Hook Clip Probe Lead Cable 500V

Multimeter Security Banana Plug To Test Hook Clip Probe Lead Cable 500V

3 Foot USB Cable Type A to USB Cable Type A

USB Cable Type A Male to USB Type A Male - 3 FT

Tumbnail: 62 oz-in NEMA 17 Stepping motors (also called stepper motor)

NEMA 17 Stepping Motor (62 oz-in 5mm single shaft)

$19.95 Out of Stock
Image of the Atmega324p


10K timmer potentiometer

10K Trimmer Potentiometer (Through Hole)

White prototyping breadboard with 30 tie strips and two power rails on each side.

White Prototyping Breadboard (2x30 columns of tie strips and 2x2 rows of power strips)


On Paper: Converting a Number to a String for Display on LCD

To be able to send a number as a string to the LCD that comes from a variable, a function must be used to convert the number to a string. Two functions are available for this: itoa and dtostrf. Itoa is for integer conversion to string. Dtostrf is for converting double precision numbers to string.

The functions syntax:
itoa(value, character array, base);
dtostrf(value, width, precision, character array);

- value is the variable that contains the number
- character array is the output string
- base - binary - 2, decimal - 10, hexadecimal - 16
- width - the length of the final string including the sign. (i.e. -123.45 would be 7)
- Precision if the number of digits after the decimal.

Comments and Additional Information

Have some code to share? Or additional information? Respond here:

You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.


Code (optional):