Loading...
Welcome,
Guest
. Please
login
or
register
.
May 21, 2013, 11:09:32 pm
|
Arduino Forum
::
Using Arduino
::
Programming Questions
:: Print...
« previous topic
next topic »
Pages: [
1
]
Go Down
Print
Author
Topic: Print... (Read 144 times)
0 Members and 1 Guest are viewing this topic.
silverplasticbox
Offline
Newbie
Karma: 0
Posts: 11
Print...
«
on:
November 22, 2012, 10:26:10 pm »
Bigger
Smaller
Reset
What am I doing wrong, I can't get it to print.
Serial Monitor is set to 9600
The servo is working fine. Just ticking away. I'm sure this is something simple. I've tried Arduino 1.0.1 and 1.0.2
using Leonardo
Code:
#include <Servo.h>
Servo myservo;
int pos = 0;
void setup()
{
Serial.begin(9600);
myservo.attach(9);
}
void loop()
{
for(pos = 90; pos < 120; pos += 1)
{
Serial.print(pos);
myservo.write(pos);
delay(500);
}
}
Logged
WizenedEE
Online
Edison Member
Karma: 15
Posts: 1006
Arduino rocks
Re: Print...
«
Reply #1 on:
November 22, 2012, 10:33:29 pm »
Bigger
Smaller
Reset
That sketch works for me.
Try disconnecting your servo; it may be an electrical problem.
Logged
codlink
USA, FL
Offline
God Member
Karma: 11
Posts: 584
A life? Where can I download one of those?
Re: Print...
«
Reply #2 on:
November 22, 2012, 10:36:58 pm »
Bigger
Smaller
Reset
Yep just tried it with mine and works without a servo attached. If it works without the servo, then you have to power the servo from another source. Like 3 or 4 AAs or something.
It prints out the value of pos on one line. I add a
Code:
Serial.println("");
so it will print to a new line everytime.
«
Last Edit: November 22, 2012, 10:38:34 pm by codlink
»
Logged
//LiNK
silverplasticbox
Offline
Newbie
Karma: 0
Posts: 11
Re: Print...
«
Reply #3 on:
November 22, 2012, 10:53:19 pm »
Bigger
Smaller
Reset
Nothing attached to the arduino, but USB now. Same thing. Serial monitor is blank.
This is supposed to print to the serial monitor correct?
Maybe I'll try on a different computer.
Logged
silverplasticbox
Offline
Newbie
Karma: 0
Posts: 11
Re: Print...
«
Reply #4 on:
November 22, 2012, 11:13:07 pm »
Bigger
Smaller
Reset
Switched to a different computer and now it works fine.
Logged
Pages: [
1
]
Go Up
Print
« previous topic
next topic »
|
Arduino Forum
::
Using Arduino
::
Programming Questions
:: Print...
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...