element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Robotics
  • Technologies
  • More
Robotics
Blog Converting Arduino code to c++ code
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Robotics to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: offlimits121
  • Date Created: 14 Dec 2016 5:06 PM Date Created
  • Views 3637 views
  • Likes 1 like
  • Comments 9 comments
  • robots
  • c++ programming
  • arduino
Related
Recommended

Converting Arduino code to c++ code

offlimits121
offlimits121
14 Dec 2016

Can anyone help me to convert my arduino code to c++ code. This is our project code for sumobot competition. Thanks

Attachments:
sumobot (1).txt.zip
  • Sign in to reply

Top Comments

  • balearicdynamics
    balearicdynamics over 9 years ago +1
    I suggest that you install AVRStudio. This is a full arduino supported environment and makes you the life extremely easy to make this porting. Take in account the following: .ino "sketches" are as a matter…
  • Robert Peter Oakes
    Robert Peter Oakes over 9 years ago +1
    Your arduino sketch is already C code, it just happens to have a set of libraries that hide the hardware from you and allow the code to be used with different hardware with little or no changes. So I would…
  • gadget.iom
    gadget.iom over 9 years ago in reply to androidrobo +1
    Is this related to the original discussion?
  • Robert Peter Oakes
    Robert Peter Oakes over 9 years ago

    Your arduino sketch is already C code, it just happens to have a set of libraries that hide the hardware from you and allow the code to be used with different hardware with little or no changes.

     

    So I would assume that you want to use a more traditional compiler like Atmel Studio that is based on Visual Studio 2015. This will still let you code the same way as a Sketch if you want, but also will allow you to create programs that will run without the boot loaders etc. There are plenty of examples along with Atmel Studio to give you a head start.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 9 years ago

    I suggest that you install AVRStudio. This is a full arduino supported environment and makes you the life extremely easy to make this porting. Take in account the following:

    • .ino "sketches" are as a matter of fact C source files iwth some limitations
    • You can already add your own C files to a sketch, it is just the case of the Arduino libraries
    • As a initial startup after the installation of the AVRstudio and the Arduino support plugins you can barely import your original sketches in an AVRStudio project then move for the conversion (with a lot of documentation and helpful contextual hints).
    • There is a very high compatibility level between the AVRStudio and the java arduino IDE
    • The only limitation is that after a sketch has been ported inside a AVRStudio project you should have a backup because you can no longer open the .ino sketch with the Arduino IDE (but this is not your need).

    For any specific detail, just ask here.

     

    Note: clem57 is right with his suggestion and hte documentation link is a great compendium. The use of AVRStudio instead gives you the option to compile the code and upload to the Arduino board like before.

     

    Enrico

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • robkeij
    robkeij over 9 years ago in reply to clem57

    Please ask this question  with a arduino file not a zip file

     

    regards,

     

    Rob Keij

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 9 years ago

    How to - Arduino code syntax in c++ (.c. cpp .h)?

    • 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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube