- Lesson 06-1: Arduino Variable and Data Types: Integer
- Lesson 06-2: Arduino Variable and Data Types: Character
- Lesson 06-3: Arduino Variable and Data Types: Float
- Lesson 06-4: Arduino Variable and Data Types: Unsigned Integer
- Lesson 06-5: Arduino Variable and Data Types: String
- Lesson 06-6: Arduino Variable and Data Types: Boolean
- Lesson 06-7: Arduino Variable and Data Types: Long
Lesson 06: Introduction to Arduino Data Types
Lesson 06: Introduction to Arduino Data Types
Please select other codes for this lecture from the links below.
This code is part of Lecture 06 Data Types: Float
Char documentation: https://www.arduino.cc/reference/en/language/variables/data-types/float/
/*
* This code is part of Step by Step Ardunio Course
Code: Lecture 06-3
* Arduino Variable and Data Types: Float
with over 100 lectures Free On YouTube Watch it here http://robojax.com/L/?id=338
Get the code for the course: http://robojax.com/L/?id=339
* Written by Ahmad Shamshiri for Robojax, robojax.com http:youTube.com/robojaxTV
* Feb 10, 2019
Please watch video instruction here https://youtu.be/n0z6fjww8eA
This code is available at http://robojax.com/course1/?vid=lecture06
*/
void setup() {
float price= 4.35;
float quantity = 8;
float cost = price * quantity;
Serial.begin(9600);
Serial.println("Robojax Step By Step Arduino Course");
//Robojax Step By Step Arduino Course http://robojax.com/L/?id=338
Serial.print("Price:");
Serial.println(price);
Serial.println(price, 4);
Serial.print("Quantity:");
Serial.println(quantity);
Serial.print("Cost:");
Serial.println(cost);
}
void loop() {
// put your main code here, to run repeatedly:
}