Questions tagged [print]
31 questions
3
votes
1 answer
Why can't I print boolean variable values (0 and 1) through println function?
source code :
int buttonPin = 8;
boolean buttonState = 0;
void setup()
{
Serial.begin(9600);
pinMode (buttonPin, INPUT);
}
void loop()
{
buttonState = digitalRead(buttonPin);
Serial.println(buttonState);
delay(500);
}
But when,…
MrDeepThought
- 81
- 3
- 3
- 11
2
votes
0 answers
How to input delay and increase volume measurements with hall sensor detection
I'm writing code so that, every time a hall monitor senses, my code additively measures 5 liters of volume as it prints each detection. Then, this data is sent via Bluetooth to a phone. (This is for a tipping bucket device that distributes 5 liters…
Anne Murray
- 31
- 1
2
votes
2 answers
Printing the array using print and serial write function in Arduino Uno
I have, one program with only using printing array and other with serial write and print function for the array, while using serial write and print function I get these extra characters between the data as shown below, can anyone help me with…
voticoy
- 21
- 1
- 2
2
votes
0 answers
Serial.println cuts off first digit
I'm trying to perform a simple analogRead() and print out the result, as below:
void getVoltMeter() {
readValue = analogRead(A2);
readByte = readValue/4;
Serial.println(readValue);
Serial.println(readByte);
}
But the output…
janizer
- 49
- 7
1
vote
1 answer
Need HELP!! Serial communication has a very "Strange Problem"
I am working on building a serial command receiver. The idea is came from the boot loader. However, I got a very strange problem that I have no idea what could cause it.
As the first screenshot show, the print isn't finished because "===a=" is…
Lu Chih Yuan
- 63
- 4
1
vote
1 answer
Arduino Serial.readString() trouble
Hello everyone I write my code and have some troubles.
When I write on in my serial monitor my buzzer condition wasn't changed.
Can you help me realize the reason. I wrote code with int type and it works with Serial.parseInt() function…
Shushan Abovyan
- 33
- 1
- 4
1
vote
1 answer
Printing vairable with U8GLib
I have this code that takes temperature and humidity values from a DHT11 sensor and number of faces from an external python code and prints them on an OLED screen but instead of values of variables it keeps printing 0, how can I solve it? (Sorry…
vueenx
- 19
- 5
1
vote
1 answer
Int64_t aka long long acts as int32_t and overflows at 2^31
I have an int64_t variable. When I add another int64_t variable
and convert it to a double to print it on the serial monitor, it acts as if it was a int32_t variable. This is the program:
int64_t a = 1 << 31;
double b =…
LukasFun
- 295
- 1
- 4
- 17
1
vote
0 answers
Arduino UTFT Touch align RIGHT with margin
I am using a TFT Touch screen on an Arduino Mega, with UTFT and UTouch libraries.
When I use the code below, the text is aligning to right, all the way to the edge of the screen. Is it possible to give it a margin?
tft.print("Text", RIGHT,12)
Thank…
Andi Stancu
- 33
- 3
1
vote
0 answers
How to pause the analog value according to input signal applied to a particular digital pin?
I'm working with a digital blood pressure meter using arduino nano. I need to display the pressure reading during inflation and deflation of the cuff instantly. And when an input signal applied to a particular pin during deflation, I need to print…
Mstar3
- 11
- 2
1
vote
0 answers
Checking Specific Brand SIM card Type Available in GSM module
Can I program a GSM module to accept a specific type of Sim card to be ready by the module? If so please post something that can give me an Idea of how do it. Generally I want to lock the GSM module to accept a given brand of sim card to be detected…
Sigma
- 39
- 4
1
vote
0 answers
How can I read the serial output of STM32F103C8T6 from USB to Serial TTL?
I recently bought a STM32F103C8T6 board (blue pill)
I programming to it using the USB to Serial TTL I bought (CP2102).
I'm still taking very first steps and trying to figure out how to operate the component.
I was able to burn a basic script to…
dog scotter
1
vote
1 answer
SyslogAppender for log4esp
I'd like to "merge" two Arduino libraires, namely log4Esp on one side and Syslog on the other, hence creating a syslog appender for log4esp.
My problem is that log4esp's Appender prototype expects a method to return an instance of Print to which…
Cerber
- 128
- 4
1
vote
1 answer
how can I send a variable to println?
this is my method
void mensaje_sms()
{
string numero = "777777"; // this is my variable
SIM900.print("AT+CMGF=1\r");
delay(100);
SIM900.println("AT+CMGS=\"591"numero"\"");
//IM900.println("AT+CMGS=\"59177777777\""); //only…
R. Fernandez
- 139
- 1
- 6
1
vote
2 answers
Serial.print and char[] & null
I don't write a lot of C, so I'm always discovering things I only partly understand in the Arduino variety. One of these is how Serial.print handles char[].
Does Serial.print always require a null terminator? In the case of (say) Serial.print(88,…
Jim Mack
- 269
- 6
- 14