Schematic for lights

Hey, I am currently doing embedded systems in university and in one of the other posts on the forum you posted the schematics for the same work I am doing. I am really hoping you'd help me out. The deadline is soon so i hope you see this quickly

What do you mean? You want to cheat at uni and get someone to do your homework because you have been lazy and not done any work so suddenly it becomes urgent?

Create your own thread and post your work (code and schematics) and clear question according to the recommendations described in How to get the best out of this forum

@tb228, do not hijack. Thread split.

Sorry if I offended you, I was just asking for help because the person did something similar. I have codes but they don't seem to work and I can't figure out why.

Sorry, this is my first time here. Didn't know I was hijacking and I didn't know what a thread split was. I apologize

This is the schematics

image
image

These are the codes I used to define my hardware,

image

my pinmodes

image
image
image
image
image
image
image

These are the codes I put in place for the lights to come on, I put delays and identified each state and put it in loop. But for some reason, whenever i upload it to the arduino, it shows an error. If you can help please help

Hi, @tb228
Welcome to the forum.

It will show you how to post your code.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia: :santa:

You really should not put code in #define like that.
Make proper functions.
Perhaps a function for each state.

You need to be more specific on what exact error....
At least one } is missing...
Why call hal function and then do the exact same thing again?

It seems to be a traffic light system, isn´t it?

Please post your code in code tags.

You could:

Use the </> tool from the little toolbar in the message composition window.

Or.

You could use Edit / Copy for Forum in the IDE, then just paste the code here.

Before you do either, apply Tools / Auto Format to put your code into a standard layout, which makes it easier to read and can help you spot mistakes.

In the IDE preferences, check Show verbose output during compilation, and dial up Compiler warnings to "All".

This will yield more red ink in the output window when you verify or upload you sketch. Read te red ink! Errors are show-stoppers, but things you are merely warned about may mean you have made other subtle "mistakes" that while valid, may not be doing what you thought.

When yoi udo get an error you can't fix, come back here and post the exact error message so we can know all you know about the matter.

a7

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.