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

  • Home
  • SEARCH
  • 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 9149661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:30:27+00:00 2026-06-17T11:30:27+00:00

All I’m trying to do is compile the Arduino to Android ‘hello world’ program

  • 0

All I’m trying to do is compile the Arduino to Android ‘hello world’ program from the book “Beginning Android ADK with Arduino”.

Here is the code

#include <Max3421e.h>
#include <Usb.h>
#include <AndroidAccessory.h>

#define ARRAY_SIZE 12

AndroidAccessory acc("Manufacturer", "Model", "Description",
                     "Version", "URI", "Serial");

char hello[ARRAY_SIZE] = {'h','e','l','l','o',' ',
                          'w','o','r','l','d','!'};

void setup() {
  Serial.begin(115200);
  acc.powerOn();
}

void loop() {
  if (acc.isConnected()) {
    for(int x = 0; x < ARRAY_SIZE; x++) {
      Serial.print(hello[x]);
      delay(250);
    }
    Serial.println();
    delay(250);
  }
}

And my error

C:\Users\efossum\arduino-1.0.1\libraries\UsbHost/AndroidAccessory.h: In function 'void setup()':
C:\Users\efossum\arduino-1.0.1\libraries\UsbHost/AndroidAccessory.h:68: error: 'void AndroidAccessory::powerOn()' is private
sketch_aug23a:14: error: within this context

I looked in AndroidAccessory.h and sure enough it is private, but what should I change to make this work? I assume making the function pulic is not the answer.

  • 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-17T11:30:28+00:00Added an answer on June 17, 2026 at 11:30 am

    I did it! I just made the visibility of the read() function in the <AndroidAccessory.h> header public and used begin() instead of powerOn() like Mickaël said, and now the code compiles successful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
All, I am trying to find a way to chunk read blob from windows
All, If I run a query like the following: $qry = Select wrong_column from
All, How can I bind the array of drop down list items returned from
all. We're trying to get some intersect collisions working, but the problem experience is
All my code is here,quite simple,and I don't konw where it goes wrong. Person
All Mysql query seems to work perfect expect condition for 'age' from my table.
all is said in the title, I want to get from an element all
I have a text area in my form which accepts all possible characters from
All the examples I can find using DLLImport to call C++ code from C#

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.