Loading...
Welcome,
Guest
. Please
login
or
register
.
May 23, 2013, 02:49:26 am
|
Arduino Forum
::
Forum 2005-2010 (read only)
::
Software
::
Troubleshooting
:: printf
« previous topic
next topic »
Pages: [
1
]
Go Down
Print
Author
Topic: printf (Read 1397 times)
0 Members and 1 Guest are viewing this topic.
hotcarrier
0
Offline
Newbie
Karma: 0
Posts: 38
Arduino rocks
printf
«
on:
September 18, 2007, 07:00:48 pm »
Bigger
Smaller
Reset
Should I expect printf to work? If I include stdio.h programs compile without error but nothing is printed back to the ide.
#include <stdio.h>
void setup(){
beginSerial(19200);
}
void loop()
{
int luckyNumber = 5;
float radius = 2;
char myName[15] = "John";
char initial = 'J';
printf("Hello World\n");
printf("My lucky number is %d\n", luckyNumber);
printf("My name is %s\n",myName);
printf("My first initial is %c\n",initial);
printf("The area of a circle with radius %f is %f\n", 3.14*radius*radius);
//Serial.println(luckyNumber);
}
Logged
imagitronics
0
Offline
Jr. Member
Karma: 0
Posts: 53
Arduino rocks
Re: printf
«
Reply #1 on:
September 19, 2007, 09:49:33 am »
Bigger
Smaller
Reset
printf doesn't print to the serial port, it just prints to the "display" (of which, there is none on arduino).
If you want the power of printf, try using the
sprintf function
and then sending the result via Serial.print().
Hope that helps.
Tim
Logged
Pages: [
1
]
Go Up
Print
« previous topic
next topic »
|
Arduino Forum
::
Forum 2005-2010 (read only)
::
Software
::
Troubleshooting
:: printf
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Discussion
-----------------------------
Using Arduino
-----------------------------
=> Installation & Troubleshooting
=> Project Guidance
=> Programming Questions
=> General Electronics
=> LEDs and Multiplexing
=> Displays
=> Audio
=> Motors, Mechanics, and Power
=> Sensors
=> Networking, Protocols, and Devices
=> Interfacing w/ Software on the Computer
-----------------------------
Topics
-----------------------------
=> E-Textiles and Craft
=> Robotics
=> Science and Measurement
=> Home Automation and Networked Objects
=> Device Hacking
=> Education and Teaching
=> Interactive Art
=> Product Design
-----------------------------
Development
-----------------------------
=> Suggestions for the Arduino Project
=> Other Hardware Development
=> Other Software Development
-----------------------------
Community
-----------------------------
=> Website and Forum
=> Products and Services
=> Gigs and Collaborations
=> Workshops and Events
=> Local Groups
=> Exhibition / Gallery
=> Bar Sport
-----------------------------
International
-----------------------------
=> Deutsch
=> Español
=> Français
=> Italiano
=> Portugues
=> Scandinavia
-----------------------------
Forum 2005-2010 (read only)
-----------------------------
===> Uno Punto Zero
===> Bar Sport
===> Frequently-Asked Questions
===> News
===> Exhibition
===> Workshops
===> Interfacing
===> Bugs & Suggestions
===> Development
===> Troubleshooting
===> Portugues
===> Deutsch
===> Español
===> Français
===> Italiano
===> Scandinavia
===> Development
===> Interfacing
===> Syntax & Programs
===> Bugs & Suggestions
===> Troubleshooting
===> Report Spam at Arduino.cc
===> Forum
===> Playground Wiki
=> General
=> Hardware
=> Software
=> International
=> Web/Forum/Email/Spam
-----------------------------
Using Arduino
-----------------------------
=> Storage
=> Microcontrollers
-----------------------------
International
-----------------------------
===> Humor y Debate
===> Talleres, Encuentros, ...
===> Tutoriels et cours
===> Réalisations et Projets Finis
===> Le bar
=> Nederlands
===> Software
===> Hardware
===> Proyectos
===> Documentación
=> India
===> Hardware
===> Software
===> Megatopic
-----------------------------
Products
-----------------------------
=> The Arduino Starter Kit
=> Arduino Due
-----------------------------
International
-----------------------------
===> Generale
-----------------------------
Products
-----------------------------
=> Arduino Esplora
=> Arduino GSM Shield
-----------------------------
Maker Faire Rome - The European Edition
-----------------------------
=> Makers
=> Events and Tour
Loading...