Help with a remote project

arduino errors out every time i attempt to upload to my arduino uno and i cant find the issue

int outPin = 7;
int pulseWidth = 0;
boolean photoLoopCompleted = false;

void setup(){

pinMode = (outPin,OUTPUT);
Serial.begin (9600);
}

void SendPulse (int pulseWidth)
{
int reps = pulseWidth/23.6;

for (int i=0;i<=reps;i++)
{
digitalWrite(outPin,HIGH);
delayMicroseconds(11);
digitalWrite (outPin,LOW);
delayMicroseconds(5);
}
}
void SendSequence ()
{
for (int i = 0;i<2;i++)
{
delay (27);
delayMicroseconds (800);
SendPulse(500);
delayMicroseconds(1500);
SendPulse(500);
delayMicroseconds(3500);
SendPulse(500);
if (i<1)
{
delay (63);
}
}
}
void DoPhotoLoop (int reps, int timeInterval)
{
for (int i = 0; i<=reps; i++)
{
SendSequence();
}
delay (timeInterval);
}

void loop (){
while (Serial.available() == 0);
Serial.read();

DoPhototLoop(1,0);

}

arduino errors out every time i attempt to upload to my arduino uno and i cant find the issue

The compiler tells you this:

sketch_dec11a.ino: In function 'void setup()': sketch_dec11a:8: error: assignment of function 'void pinMode(uint8_t, uint8_t)'

Have you seen any calls the pinMode that look like yours?

Please use code tags when posting code.

AWOL:

arduino errors out every time i attempt to upload to my arduino uno and i cant find the issue

The compiler tells you this:

sketch_dec11a.ino: In function ‘void setup()’:
sketch_dec11a:8: error: assignment of function ‘void pinMode(uint8_t, uint8_t)’

Have you seen any calls the pinMode that look like yours?

Please use code tags when posting code.

i’m sorry, im new to both arduino and the forums

There’s one “pinMode” in your sketch.
Look at some of the calls to “pinMode” in the examples provided, and see how it differs.

AWOL: There's one "pinMode" in your sketch. Look at some of the calls to "pinMode" in the examples provided, and see how it differs.

the examples are not explaining as much as i was hoping still playing around i can not get the program to work.

OK, pinMode from one of the examples: pinMode(led, OUTPUT); Your pinMode pinMode = (outPin,OUTPUT);

Reference

AWOL: OK, pinMode from one of the examples: pinMode(led, OUTPUT); Your pinMode pinMode = (outPin,OUTPUT);

Reference

remote.ino: In function 'void setup()': remote:9: error: assignment of function 'void pinMode(uint8_t, uint8_t)' remote:9: error: cannot convert 'int' to 'void ()(uint8_t, uint8_t)' in assignment remote.ino: In function 'void loop()': remote:57: error: 'DoPhototLoop' was not declared in this scope

still get errors and being so new to arduino im having trouble, troubleshooting.

'DoPhototLoop' was not declared in this scope

Spelling.

Read very carefully what you have written. Even if you don't, the compiler will.

The error message told me what the issue was before I looked to the end of the thread. You are "assigning" something when you should be "calling" that thing.

 pinMode = (outPin,OUTPUT); //assigns the expression (outPin,OUTPUT) to the variable pinMode - not gonna work

thank you very much it was such a small mental error that i wasnt even thinking, thank you

Sparky0497: thank you very much it was such a small mental error that i wasnt even thinking, thank you

It won't be the last one XD

Keep in mind, when reading C compiler output, usually only the first error message matters - the other errors will be 'because of' the first one, usually. Over time you'll learn to find this stuff quickly, but it takes experience. The only reason I saw the issue is because I've been a maintenance programmer for 20 years and I make my living reading code written by others. You have to do a lot of that before you start seeing your own mistakes quickly.

Just keep in mind - when you see it say something like "Whatever isn't defined" you need to check every character, and the casing - C is case-sensitive, so

int q = 10; int Q = 20;

Different variables.

yeah its new for me, all ive ever coded in was java and even then i only have a couple years of experience

I'm pretty sure Java is hot on spelling and syntax too.

Yeah Java is case-sensitive also, but modern IDEs have syntax highlighting and auto-complete, so our students are not learning to be detail oriented with their code entry. Arduino and other stripped-down IDEs help with that problem, but it's not so much a problem in professional settings, because professional tools, with their crutches, are always available. That helps beginner programmers thrive, so I think it's a good thing.

Our company did a search a while back and one thing we needed was "ability to hand-code HTML" - it was right there in the job description, it was like the 5th or 6th thing. Nobody passed the test, and it wasn't even hard, and these were people who had jobs as web developers and had good references and a good phone interview. So, I think hand-coding without the assistance of modern tools is kind of an intermediate skill. Working with Arduino definitely helps develop that skill.