|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: A few simple programming questions;
Code:
if(p3_sw_top == 1)
{
pwm09 = 127;
pwm10 = 127;
}
else
{
pwm09 = 254;
pwm10 = 254;
}
Quote:
relay1_fwd and relay1_rev. If you wanted to fire the spike in one direction, you would set: Code:
relay1_fwd=1; relay1_rev=0; Quote:
Code:
relay1_fwd = relay1_rev = 0; Quote:
Code:
else if(p3_sw_trig==0) Quote:
Regarding the syntax error, from a brief glance at the code, it looks like you might be missing a brace or two. Try adding them one by one to the end of your code, and see if that helps. Hope this helps, |
|
#2
|
||||
|
||||
|
Re: A few simple programming questions;
in the printf statement put in the end ...%d\r",
You can also change the stuff in the quotes to print what every you want. |
|
#3
|
||||
|
||||
|
Re: A few simple programming questions;
Quote:
Im almost certain there is no IF AND ELSE statement ? |
|
#4
|
|||
|
|||
|
Re: A few simple programming questions;
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: A few simple programming questions;
I see you have an unmatched bracket here that will give you the syntax error.
Code:
if(p3_sw_trig)
{
Switch over to the // form rather than use the /* */ form. Your blocks are ending in random places. Last edited by Mark McLeod : 15-02-2006 at 09:52. |
|
#6
|
||||
|
||||
|
Re: A few simple programming questions;
Quote:
Code:
complicatedMethod(); /*Some comment here*/ Code:
#if 0 complicatedMethod1(); /*Some comment here*/ complicatedMethod2(); /*Some comment here*/ complicatedMethod3(); /*Some comment here*/ #endif Paul Dennis |
|
#7
|
|||||
|
|||||
|
Re: A few simple programming questions;
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To Ask Questions the Smart Way | Brandon Martus | General Forum | 8 | 27-03-2013 15:52 |
| Programming laptops | [527]phil | Programming | 24 | 22-08-2005 12:28 |
| #1 The Journey of a FIRST Graduate: Questions | Ken Leung | General Forum | 12 | 27-07-2005 18:24 |
| Suggestion for Delphi Programming Posts | Chris Hibner | CD Forum Support | 1 | 27-07-2005 10:02 |
| Can You help us??? (programming questions) | HuskieRobotics | Programming | 1 | 24-02-2004 21:19 |