Go to Post Oh, please, please, GDC! Give us a corn game! - Richard Wallace [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2003, 18:54
Team168 Team168 is offline
Registered User
#0168 (Flashbacks)
 
Join Date: Jan 2003
Location: Miami
Posts: 2
Team168 is an unknown quantity at this point
Question Globe Motor

We have a globe motor set to a speed controller on the RC and we have two digital switches on the OI to control it. What do we set the PWM to in the Serout command?
__________________
Adapt, Adjust, Overcome
  #2   Spotlight this post!  
Unread 15-02-2003, 20:09
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
Here's my suggestion:

Code:
globe_motor VAR byte              ' put this in the "declare variables" section

' Main Loop:

globe_motor = 127 + (127*switch_one) - (127*switch_two)
You gotta put the globe_motor in your serout, in whatever PWM output you want.

With this code, the motor will turn CW if switch_one is pressed, and CCW if switch_two is on. If both are pressed, nothing happens.

Hope I helped, feel free to ask any question.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
  #3   Spotlight this post!  
Unread 16-02-2003, 00:05
Goya Goya is offline
Registered User
#0019 (Big Red)
 
Join Date: Jan 2003
Location: Greenwich, CT
Posts: 35
Goya is an unknown quantity at this point
Send a message via AIM to Goya
Just a quick question -

Is PBASIC operand supportive? For example, would it work mathematically left to right, do exponents before subtraction, etc?
  #4   Spotlight this post!  
Unread 16-02-2003, 11:50
Manoel's Avatar
Manoel Manoel is offline
Registered User
FRC #0383 (Brazilian Machine)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Porto Alegre, RS, Brazil
Posts: 608
Manoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond reputeManoel has a reputation beyond repute
Send a message via ICQ to Manoel Send a message via MSN to Manoel
It works from left to right, period.
For example:
3+2*6
In normal math, you would multiply 2 by 6 and then add 3, for a total of 15. In PBasic, you sum 2 to 3 and then multiply by 6, resulting in 30. You have to use parentheses if you want to give any operation priority over another.

Hope I was clear.
__________________
Manoel Flores da Cunha
Mentor
Brazilian Machine
Team # 383
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Globe Motor archiver 2000 4 24-06-2002 00:15
Globe Motor archiver 2000 0 24-06-2002 00:15
So you want to stall a Globe Motor... archiver 2000 1 24-06-2002 00:09
Globe Motor and Thermal Protection archiver 1999 0 23-06-2002 22:03
Help! Need a Globe Motor Dodd Motors 0 24-07-2001 11:57


All times are GMT -5. The time now is 08:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi