Thread: C Code for a flow diagram

  1. #1
    Registered User
    Join Date
    Nov 2015
    Posts
    2

    Question C Code for a flow diagram

    Hi Forum,

    I am currently struggling a lot with writing a C code for my flow diagram. I am not very familiar with C.

    Can someone please help me out?

    I am sure it is not very difficult for someone who knows C code well.

    Here is the flow diagram

    http://s18.postimg.org/9cmsb4da1/Untitled_Diagram.png

    Someone please help

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Your image is too small for me to read.

    Anyway, you should give it a try first and post your best attempt.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,787
    It's not too small for me to read, but it's kind of messy and I'm not 100% it's correct. Did you design the flowchart yourself, or were you given it?

  4. #4
    Registered User
    Join Date
    Nov 2015
    Posts
    2
    Quote Originally Posted by Hodor View Post
    It's not too small for me to read, but it's kind of messy and I'm not 100% it's correct. Did you design the flowchart yourself, or were you given it?
    Hi,

    Many thanks for replying.

    I have been given a following set of instructions and then made the flow chart myself:

    The C code must do the following:


    1. Oven ON/OFF LED and Switch (Oven must be on to do anything)
    2. Set oven Desired temperature using a potentiality (One that is inbuilt in MCU SLK)
    3. Oven door closed (digital input)
    4. Oven Door closed on/off indication via an LED
    5. Oven Door locked when temperature is above 100degC
    6. Oven Door locked indication via an LED
    7. Heater on/off indication via an LED
    8. Set oven actual temperature via ANOTHER potentiality which has to be plugged into the MCU SLK
    9. Temperature monitoring via display which is in-built into the MCU SLK
    10. Safety indication where LEDs blink if oven goes above 250 degC and a command which will stop the heater until temperature is below 250degC again.

  5. #5
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    What have you tried? Post your code and then ask specific questions about the code.

    For anyone to really help you we'll need to have much more information about your development board. And a schematic showing what and how things are connected to your development board would also be helpful.

    Jim

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code Flow (arrays and loops)
    By LLINE in forum C++ Programming
    Replies: 4
    Last Post: 02-15-2013, 02:51 PM
  2. explain Flow of C code
    By emb_begin in forum C Programming
    Replies: 2
    Last Post: 02-18-2011, 07:50 AM
  3. Code flow analyzer
    By CodeMonkey62 in forum C++ Programming
    Replies: 7
    Last Post: 05-26-2010, 02:54 AM
  4. box-and-circle diagram
    By kezkez in forum C Programming
    Replies: 0
    Last Post: 02-12-2010, 10:34 PM