IDE can't find header file

image shows "Nimbits.h" can't be found. but the file clearly exists. Where should it be placed then?

Have you looked at:

error message i got when i imported/added library:


and then after i ran the sketch for errors:


For Arduino 1.06 IDE.
3rd party libraries should be installed as in this example.

If you have a library called Scheduler then the path is
C:\Users\UserName\Documents\Arduino\libraries\Scheduler

In this folder you would find:
Scheduler.cpp
Scheduler.h
keywords.txt
Examples (FOLDER)

After installing your new library you must close your IDE then start the IDE up again.

.

The "examples" folder, "Nimbits.h", and "Nimbits.cpp" files weren't immediate subdirectories/ files. I copied and pasted them so that they would be immediate subdirectories / files. I've also restarted my IDE numerous times. It's still not finding "Nimbits.h"

here's the .zip download site: GitHub - bsautner/com.nimbits: Deprecated - The Nimbits Platform Provides a universal IOT framework. could you take a look at the files see what might be wrong?

Nimbits.cpp and Nimbits.h and examples should be in a Folder called Nimbits in the library folder, path:
C:\Users\UserName\Documents\Arduino\libraries\Nimbits

.

I have no idea how to interpret this what does it need me to DO?

Arduino: 1.6.3 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files (x86)\Arduino\libraries\NimbitsClient\Nimbits.cpp: In member function 'String Nimbits::login(String, String)':

C:\Program Files (x86)\Arduino\libraries\NimbitsClient\Nimbits.cpp:260:18: error: ambiguous overload for 'operator=' (operand types are 'String' and 'ArduinoJson::JsonObjectSubscript<const char*>')

       _authToken = root["token"];

                  ^

C:\Program Files (x86)\Arduino\libraries\NimbitsClient\Nimbits.cpp:260:18: note: candidates are:

In file included from C:\Program Files (x86)\Arduino\libraries\NimbitsClient/Nimbits.h:22:0,

                 from C:\Program Files (x86)\Arduino\libraries\NimbitsClient\Nimbits.cpp:17:

C:\Users\Ben\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2\cores\arduino/WString.h:86:11: note: String& String::operator=(const String&)

  String & operator = (const String &rhs);

           ^

C:\Users\Ben\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2\cores\arduino/WString.h:87:11: note: String& String::operator=(const char*)

  String & operator = (const char *cstr);

           ^

C:\Users\Ben\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2\cores\arduino/WString.h:88:11: note: String& String::operator=(const __FlashStringHelper*) <near match>

  String & operator = (const __FlashStringHelper *str);

           ^

C:\Users\Ben\AppData\Roaming\Arduino15\packages\arduino\hardware\avr\1.6.2\cores\arduino/WString.h:88:11: note:   no known conversion for argument 1 from 'ArduinoJson::JsonObjectSubscript<const char*>' to 'const __FlashStringHelper*'

Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

I have no idea how to interpret this

Is this a new/different error message than the original one about not being able to find Nimbits.h ?

Please post your program that #includes Nimbits.h

it found Nimbits.h, it seems I’m having a different problem now

#include "Arduino.h"
#include <Ethernet.h>
#include <SPI.h>
#include <Nimbits.h>
#include <ArduinoJson.h>


byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
char server[] = "cloud.nimbits.com";
char email[] = "test@example.com";

//This can be your password if you created an account and set a password, or an access key if you 
//logged into the server and created a key - use an access key if you log into nimbits with a google account, for example.
char password[] ="key"; 
int port = 80;

String point = "pointname";
  
Nimbits client(server, port);

void setup() {
  
  Serial.begin(9600);
  Ethernet.begin(mac);

  Serial.println("Logging in...");
  String authToken = client.login(email, password);
  
  Serial.println("Ready");
}

void loop() {
 
    client.recordValue(random(300), point); 
    delay(1000);
}

Can you post Nimbits.cpp here please.

sure thing

nimbits.cpp:

#include <Arduino.h>
#include <Dhcp.h>
#include <Dns.h>
#include <EthernetServer.h>
#include <util.h>
#include <EthernetUdp.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <SPI.h>
#include <stdlib.h>
#include <stdio.h>
#include "Nimbits.h"
#define BUFFER_SIZE 1024
#define PORT 80
#define CATEGORY 2
#define POINT 1
#define SUBSCRIPTION 5

const char *GOOGLE = "google.com";


const String CLIENT_TYPE_PARAM="&client=arduino";
const String APP_SPOT_DOMAIN = ".appspot.com";
const String PROTOCAL = "HTTP/1.1";
const int WAIT_TIME = 1000;
const char quote = '\"';


String _ownerEmail;
String _instance;
String _accessKey;
Nimbits::Nimbits(String instance, String ownerEmail, String accessKey){
  _instance = instance;
  _ownerEmail = ownerEmail;
  _accessKey = accessKey;

}


String createSimpleJason(char *name, char *parent, int entityType) {


}
String floatToString(double number, uint8_t digits) 
{ 
  String resultString = "";
  // Handle negative numbers
  if (number < 0.0)
  {
    resultString += "-";
    number = -number;
  }

  // Round correctly so that print(1.999, 2) prints as "2.00"
  double rounding = 0.5;
  for (uint8_t i=0; i<digits; ++i)
    rounding /= 10.0;

  number += rounding;

  // Extract the integer part of the number and print it
  unsigned long int_part = (unsigned long)number;
  double remainder = number - (double)int_part;
  resultString += int_part;

  // Print the decimal point, but only if there are digits beyond
  if (digits > 0)
    resultString += "."; 

  // Extract digits from the remainder one at a time
  while (digits-- > 0)
  {
    remainder *= 10.0;
    int toPrint = int(remainder);
    resultString += toPrint;
    remainder -= toPrint; 
  } 
  return resultString;
}
void Nimbits::recordValue(double value, String note, char *pointId) {
  EthernetClient client;

  String json;
  json =  "{\"d\":\"";
  json +=floatToString(value, 4);

  json += "\",\"n\":\""; 
  json +=  note; 
  json +=  "\"}"; 
  String content;
  content = "email=";

  content += _ownerEmail;
  content += "&key=";
  content += _accessKey;
  content += "&json=";
  content += json;
  content += "&id=";
  content +=  pointId;

  Serial.println(content);

  if (client.connect(GOOGLE, PORT)) {
    client.println("POST /service/v2/value HTTP/1.1");
    client.println("Host:nimbits-02.appspot.com");
    client.println("Connection:close");
    client.println("User-Agent: Arduino/1.0");
    client.println("Cache-Control:max-age=0");
    client.println("Content-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.println(content.length());
    client.println();
    client.println(content);

    while(client.connected() && !client.available()) delay(1);
    while (client.available() ) {
      char c = client.read();
      Serial.print(c);

    }
  }

}

void Nimbits::addEntityIfMissing(char *key, char *name, char *parent, int entityType, char *settings) {
  EthernetClient client;
  Serial.println("adding");
  String retStr;
  char c;
  // String json;
  String json;
  json =  "{\"name\":\"";
  json += name; 
  json.concat("\",\"description\":\""); 
  json +=   "na"; 
  json += "\",\"entityType\":\""; 
  json +=  String(entityType); 
  json +=  "\",\"parent\":\""; 
  json +=   parent; 
  json += "\",\"owner\":\""; 
  json +=  _ownerEmail;
  json +=  String("\",\"protectionLevel\":\"");
  json +=   "2";
  
  //return json;
  switch (entityType) {
  case 1: 
    // json = createSimpleJason(name, parent, entityType); 

    break;
  case 2: 
    // json = createSimpleJason(name, parent, entityType); 
    break;
  case 5: 
    json +=  "\",\"subscribedEntity\":\""; 
    json +=   parent; 
    json +=  "\",\"notifyMethod\":\""; 
    json +=   "0"; 
    json +=  "\",\"subscriptionType\":\""; 
    json +=   "5"; 
    json +=  "\",\"maxRepeat\":\""; 
    json +=   "30"; 
    json +=  "\",\"enabled\":\""; 
    json +=   "true"; 

    break;
  }
  json += settings;
  json +=  "\"}";
  Serial.println(json);
  String content;
  content = "email=";

  content += _ownerEmail;
  content += "&key=";
  content += _accessKey;
  content += "&json=";
  content += json;
  content += "&action=";
  content += "createmissing";
  Serial.println(content);
  if (client.connect(GOOGLE, PORT)) {
    client.println("POST /service/v2/entity HTTP/1.1");
    client.println("Host:nimbits-02.appspot.com");
    client.println("Connection:close");
    client.println("User-Agent: Arduino/1.0");
    client.println("Cache-Control:max-age=0");
    client.println("Content-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.println(content.length());
    client.println();
    client.println(content);

    while(client.connected() && !client.available()) delay(1);
    int contentLength = 0;
    char buffer[BUFFER_SIZE];


    while (client.available() && contentLength++ < BUFFER_SIZE) {
      c = client.read();
      Serial.print(c);
      buffer[contentLength] = c;
    }
    Serial.println("getKeyFromJson");
    Serial.println(sizeof(buffer));
    int i=0;
    char item[] = {
      "\"key\":"          };
    while (i++ < sizeof(buffer) - sizeof(item)) {
      boolean found = false;
      found = false;
      for (int v = 0; v < sizeof(item) -1; v++) {

        if (buffer[i+v] != item[v]) { 
          found = false;
          break;
        }
        found = true;
      }
      if (found) {
        break;
      }


    }

    i = i + sizeof(item)-1;
    int keySize = 0;
    while (i++ < sizeof(buffer)-1) {
      if (buffer[i] == quote) {
        break;
      }
      else {
        key[keySize++] = buffer[i];
      }
    }
    key[keySize] = '\0';
    Serial.println(key);



    client.stop();
  }
  else {
    Serial.println("could not connect");

  }
  delay(1000);
}


//String Nimbits::getTime() {
//  EthernetClient client;

// if (client.connect(GOOGLE, PORT)) {
//  client.print("GET /service/v2/time?");
//writeAuthParamsToClient(client);
//writeHostToClient(client);

// return getResponse(client);


//}




//record a value

//record data

//create point

//create point with parent

//batch update

//delete point

//get children with values

PS, something must be wrong on my tablet and laptop, I seem to be the only one having this much trouble getting nimbits up and running…

I have no idea how to interpret this what does it need me to DO?

Quit using Strings. root[“token”]; returns a char *. You can’t assign that to a String.

Quit using Strings. root["token"]; returns a char *. You can't assign that to a String.

Okay. Well from the error message I assumed I'd be changing the argument types for "login(string, string)" found in "Nimbits.cpp." But then there is no "login()" function in Nimbits.cpp....

But then there is no "login()" function in Nimbits.cpp....

Well, except for the one starting on line 223...

In nimbits.cpp? Line 223 is a blank space and there is no "login" in the following block of code. Is login what i'm supposed to be looking for? the IDE's search feature doesn't see any "login"s in Nimbits.cpp

https://github.com/bsautner/com.nimbits/tree/master/samples/arduino/NimbitsClient
contains Nimbits.cpp, that has this at line 223:

String Nimbits::login(String email, String password) {
  EthernetClient client;
  _email = email;
  _password = password;
  String content;
  content = "email=";
  content += email;
  content += "&token=";
  content += _password;




  if (client.connect(_hostname.c_str(), _port)) {