<Solved> Can Someone Please Create a code based on my flowchart please

Im doing a project and the teacher basicly just give a pass on copying other people's code but i can't seem to find a similar code anywhere and most people on my class know a little bit of coding only so any help would be greatly appreciated and thanks



What should happen if the ultrasonic sensor detects a large dog?
What should happen if someone walks into the room wearing a soft down jacket, and the ultrasonic sensor doesn't see them?

1.it will probably think the dog's a human
2.the teacher said that he only want a concept and that complications like that is not needed yet.
thanks

If you just want someone to write a program for you please ask in the Gigs and Collaborations section of the Forum and be prepared to pay.

If you want to learn to program yourself the examples that come with the Arduino IDE are a good place to start. They probably cover all the techniques you will need. There are also many online tutorials. Also see the Useful Links Thread.

Please display your image(s) in your post so we can see it(them) without downloading it(them). See this Simple Image Posting Guide

...R

CosmicRavioli:
2.the teacher said that he only want a concept and that complications like that is not needed yet.

are you asking someone to do your homework?

well yes......but the teacher said that we can do whatever we want including copying codes and well ask people to do it and stuff,i don't really get him,he haven't even teach us about the codes and just order homework , with the circumstances i don't really have a choice since most people in my class are also confused, i understand if you think i am lazy.

What is the name of the college you are at?
What is its address and phone number?
Which course are you on?
Who is your teacher?
What is their email address?

CosmicRavioli:
well yes......but the teacher said that we can do whatever we want including copying codes and well ask people to do it and stuff,i don't really get him,he haven't even teach us about the codes and just order homework , with the circumstances i don't really have a choice since most people in my class are also confused, i understand if you think i am lazy.

If your teacher is so bad you should be complaining to the college about him. This is your life, your education, the only person who is going to suffer here is you. You are on the course to learn something, which they are failing to teach you. Do not accept the poor teaching, do something about it.

1.it's a high school named Bangkok Christian College (BCC)
2. it's in bangkok,thailand near sathorn road ,sorry that's all i know
3.Innovation course it teaches about code and stuff so kids who like code and stuff will have prior experience (but the homework is from a normal course class) but it mostly is just kids with a little bit of knowledge brainstorming together to create innovations that already exist but atleast we made it function and some kid are already on their way to create real innovations.
4.adirek that's all i know sorry
5.i don't know, he collect works by flashdrive

also yes good advice but i think it problem with the whole education system (which is considred poor in my country) since the "go to the internet and find your answer "part is from the course,i've already got codes from my last homework but it will probably fail (if you want to see it i've attach it to the post.

Code 26_26.txt (624 Bytes)

OK, thank you. I am sorry the education in your country is not good. The kind of help you really need is the kind I can't give. Writing your code for you won't help you, you won't learn anything. However, I think you have to make a decision; do you want to learn to code or not? If not, then walk away, there's no point you doing this and no point us helping.

If you really do want to learn then Arduino and this forum are designed and intended to help people teach themselves how to write code and use micro-controllers. However, we won't do it for you, but we will help when you get stuck provided you show some signs of really trying (hint, by asking us to write your code you are not showing the slightest sign of trying). I suggest you get hold of an Arduino starter kit (no, I have no idea if that's going to be easy or impossible for you) and learn by doing the examples with the kit and on this web site.

BTW, while there are professionally trained programmers on here there are also a lot who were self taught, myself included (with a bit of help from 2 friends, also self taught). You do not need formal education to become good a writing code, but you do need to get your hands dirty and actually try to write some code.

//---------------------------------------------------------------------------------------------------------
Ahsanullah...............
141-142 ...............................................
EEE-3209 : ATmega328P MCU Programming and Interfacing (using Arduino UNO Learning Kit)
G...................................
bd...........................@................
//---------------------------------------------------------------------------------------------------------

Human being is very complicated. He usually can not give right answer at the first attempt. Which Learning Approach should we apply - supervised, unsupervised or reinforced? That depends on experience. Some times examples help; in other times, clues help; in some other times, critic (right/wrong answer) helps.
//----------------------------------------------------------------------------------------------------------

I transmitted the following quiz (not my creation) among 6 academicians; only one participated. Why have I failed to draw the attention of the remaining 5?

You have an automatic syringe (Fig-1) to intake some amount of liquid -- say 1362 ml which you can preset using a keypad. There are two keypads; which one you would choose and why?


Figure-1:

A school/college going boy (the OP) has placed his problem and has asked for help. Has he not learned something? Let us help him how to transform his Flow Chart (Fig-2) into a Programming Structure and then into coding using Arduino UNO.


Figure-2:

CosmicRavioli:
Im doing a project and the teacher basicly just give a pass on copying other people's code but i can't seem to find a similar code anywhere and most people on my class know a little bit of coding only so any help would be greatly appreciated and thanks

CosmicRavioli:
Im doing a project and the teacher basicly just give a pass on copying other people's code but i can't seem to find a similar code anywhere and most people on my class know a little bit of coding only so any help would be greatly appreciated and thanks

What equipment or boards do you have to work with? The first place to start is to determine what type output the ultrasonic sensor has. It should be either analog or digital. When that is determined, then you can start experimenting with the arduino example code.

Do you have this unoPicture.png Arduino UNO Board? Can you find a built-in LED (L) over there? Can you write code to ignite (ON) it?

unoPicture.png

the teacher basicly just give a pass on copying other people's code

Does the code actually need to work ?
Do you need to understand it ?

Here is a start:

void setup()
{
  pinMode(LED_DOPin, OUTPUT);
  pinMode(UltrasonicTrigger_DOPin, OUTPUT);
  pinMode(UltrasonicEcho_DIPin, INPUT);
}

void loop()
{
  if (DetactAPerson())
    digitalWrite(LED_DOPin, HIGH);

  if (LeaveTheRoom())
  {
    delay(30000UL);
    digitalWrite(LED_DOPin, LOW);
  }
}

boolean DetectAPerson()
{
  // return true if a person is detected

  // Otherwise...
  return false;
}

boolean LeaveTheRoom()
{
  // return true if a person has left the room

  // Otherwise...
  return false;
}

UKHeliBob:
Does the code actually need to work ?
Do you need to understand it ?

If the answer to both of those is "NO" it raises some interesting possibilities.

...R

Robin2:
If the answer to both of those is "NO" it raises some interesting possibilities.

...R

That the OP is actually . . . the teacher?
Dum-dum-daaaah

Oh, the questionators, another slow Monday with little to do!

Before you start writing codes for your Flow Chart of Fig-1, you should place labels on the middle (approximately) of all the arrow lines -- a standard practice in Flow Chart Programming.


Figure-1:

Now, there is a task between each two labels for which you can easily write codes. For example -- write Arduino codes for the tasks:
1. between L5 and L6.

//L5: - L6:
delay(30000);   //argument is in ms; wait for 30-sec
digitalWrite(13, LOW);    //assume built-in LED (L) which is connected at DPin-13 of UNO

2. between L4 - L5 - L7
//L4:

if(the object has gone from the room)
{
  //L5:
  delay(30000);   //argument is in ms; wait for 30-sec
  digitalWrite(13, LOW);    //assume built-in LED (L) which is connected at DPin-13 of UNO
  //L6:
  wait here for ever with LED (L) already at OFF state; //while(1);
}
else
{
  //L7:
  wait here for ever with LED (L) already at ON state; //while(1);
}

i've already gotten the code from someone who eish to remain anonymous​, so i guess case's closed, thanks