element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • Learning Center
    • Learning Groups
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Software design and implementation
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: nikollao
  • Date Created: 28 Mar 2016 9:40 AM Date Created
  • Views 882 views
  • Likes 1 like
  • Comments 6 comments
  • source code
  • doxygen
  • software design
  • abstract
  • uml
  • code implementation
  • arm
Related
Recommended

Software design and implementation

nikollao
nikollao
28 Mar 2016

Software Design

 

   The purpose of this blog is to demonstrate the process of the software design and the code implementation of the project. To begin with, project design is the transformation of a conceptual idea – the game Treasure Hunt – into logical series of steps to be followed, that help writing the source code easier and more structured. Software design has usually a high level of abstraction, as diagrams are drawn as systems interacting with different components. Each block of the diagram represents an action or an activity, which would be a command line or a function in the script respectively. Software design diagrams are usually drawn in UML, the unified modeling language which is used by software engineers to visualize and control the flow of the software. An abstract diagram of the game is shown below:

 

image

 

 

Furthermore, a more detailed way to visualize the flow of the code is by the use of flowcharts. Flowcharts represent algorithms by the use geometrical symbols to specify each step, and arrows to specify the direction of flow. The flowchart is  similar to the diagram above, however the level of detail is higher. The most important symbols are probably the rectangle, which specifies a command or a function, and the rhombus which specifies a decision. The flow chart that represents the game is shown below:

 

image

 

Code implementation

 

The next step is to write the code based on the diagrams shown above. The programming language used in this project to write the code is C++. The compiler used to convert the software into machine code is the online ARM mbed compiler, since an ARM microcontroller (MCU) is used. The URL of the compiler is:

https://developer.mbed.org/compiler

 

Firstly, the Nokia N5110 LCD library must be imported to the program and included in the main header file. This library was given to the students by the module leader. Some written functions were also provided in the library, such as init() which initializes the connection between the MCU and the screen, or clear() which sets the pixels in the screen to low (0). An object could be created from the N5110 class, which would act as the path to use the functions in the .cpp file of the program.

image

 

In addition, doxygen is used to add comments in the source code. Doxygen is a standard tool for generating documentation for the source code. Comments are very important in software development as it helps the programmer remember his code and develop it, and it allows others who read the code to understand it. The documentation of the functions used in the project is shown in the figure below:

 

image

 

Functions are very important when writing code, as they provide significant advantages. Not only they can be called anywhere in the program, but they also maintain the main tidy, and well-structured. The hero function is shown below:

 

image

 

The function which provides guidance to the hero is shown above.

 

image

 

The functions shown in the blog are not the last version of the code and they could be updated. More functions will be shown in further blogs.

 

Conclusion

 

To conclude, the aim of this blog was to demonstrate the progress of the software aspect of the project. Software design diagrams were displayed which contained a high level of abstraction, however they provide a visual feedback of the flow of the program, and make the software easier to implement. An introduction to the code implementation was done and some written functions of the project were shown.

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 8 years ago +1
    Software design diagrams are usually drawn in UML Do people really formally use UML? In a fair amount of years of software design I've not seen it used much at all. I've seen the books and software tools…
  • DAB
    DAB over 8 years ago +1
    Very good post. I for one still use flow charts. They are still the easiest way to get your flow thoughts together and identify information flow and command sequencing. Great start. DAB
  • clem57
    clem57 over 8 years ago +1
    Good Ole flowcharting. The past meets the future with Doxygen. Clem
Parents
  • DAB
    DAB over 8 years ago

    Very good post.

     

    I for one still use flow charts.  They are still the easiest way to get your flow thoughts together and identify information flow and command sequencing.

     

    Great start.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • DAB
    DAB over 8 years ago

    Very good post.

     

    I for one still use flow charts.  They are still the easiest way to get your flow thoughts together and identify information flow and command sequencing.

     

    Great start.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • nikollao
    nikollao over 8 years ago in reply to DAB

    Thank you! I do agree flowcharts are pretty useful when writing code.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube