Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9144833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:21:59+00:00 2026-06-17T10:21:59+00:00

Background: I am programming an ATmega328 . I can’t stand the Arduino IDE, so

  • 0

Background:

I am programming an ATmega328. I can’t stand the Arduino IDE, so I prefer using Xcode for writing code. However, I have found all of the options available online for using Xcode to actually upload sketches to Arduino to be convoluted at best and have not been successful in trying to implement them.

Current Method:

What currently works well for me is to use Xcode strictly as a debugger, and ‘creating’ stripped down versions of Arduino classes when I need them so the debugger doesn’t freak out when I put in lines of code specific to Arduino. For example, I have a Serial class in my Xcode project which has the following functions, which work just fine:

void Serial::print(int myInt)
{
    cout << myInt;
}

void Serial::println(int myInt)
{
    cout << myInt << endl;
}

I do the same for strings, and whatever other standard C++ datatype I may need to print.

This way, any time I want to put Serial.print within a function in another class I’m working on, I can debug strictly from within Xcode without opening the Arduino IDE. I can also create a “fake” class for pinMode, etc.

Issue:

I would like to do this with the byte datatype used in the Arduino environment. I am taking an object-oriented approach to this program, and it threatens to eat up the precious RAM on my little Arduino. So, in order to save space, I’m converting all my ints to bytes and so forth.

But, I assume (and my compiler tells me) that I can’t subclass char, or int, or any other basic types. I don’t see how I can start using statements like “byte a = 2” or something similar with my current (somewhat convoluted) work-around method.

Essentially, I want to trick Xcode into thinking byte is the same thing as int for all intents and purposes.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:22:00+00:00Added an answer on June 17, 2026 at 10:22 am

    Typedefs. (By the way, it’s not Xcode who you will be fooling, but the compiler.)

    typedef int byte;
    

    or

    typedef uint8_t byte;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm fairly new to VBA, however I have a programming background. I'm writing VBA
I'm from a Windows programming background when writing tools, but have been programming using
I have a background of programming in Java and C++, so I know all
I am from procedure programming background, end up writing TSQL recently with my new
I have about 4-5 years of background in programming some in C# and some
Quick background: I'm programming in PHP, I have a domain model with a separate
I don't have any background in programming and this is my first shot. I
We have a user experience designer in our team who has no programming background.
Second week on RoR (with no programming background). And I have a bit of
I have a background in programming and have done a little .NET but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.