Archive for August, 2017

Age of the everyday IoT entrepreneur is here and now ….

August 28, 2017

IoT is the new buzz word these days. Anyone who knows anything about Information technology is feeling the buzz. There have been a lot of products which are making all this happen for the everyday entrepreneur and also for the established companies. Access to electronics, access to code which makes it easy to interface with those, price of the components, easy access to amazing education through video tutorials, blog posts, meetup groups etc.

The feature of the everyday entrepreneur is here and now. If you can imagine it and even better put the ideas on paper to products on shelves then your time has come….

Bigger corporations have very few advantages over an everyday entrepreneur these days right from design, engineering, supply chain, distribution etc.

For anyone new to the space who has an idea we can help you get it to market by either partnering with you or consulting on the product…

The Hype of IoT and the areas of applications from an old Gartner article is clearly defined here:

Iot_

Source: Gartner (July 2014)

http://www.gartner.com/technology/reprints.do?id=1-27LJLAK&ct=150119&st=sb

 

Challenges:

The biggest challenges in IoT from a technology perspective are:

1)      Lightweight networking standards

2)      Securing the data

3)      Power Management in IoT devices

In the end I think if you are getting to the new space of IoT or have some great ideas it is time to put those into practice. Happy IoT’ing

Advertisements

From the trenches – Arduino compilation and link errors and fixes to those

August 28, 2017

Error 1 – Loader error of undefined reference
Arduino: 1.6.5 (Windows 8.1), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

myrobot.cpp.o: In function `__static_initialization_and_destruction_0′:
C:\Program Files (x86)\Arduino/myrobot.ino:57: undefined reference to `Michelino::Robot::Robot()’
myrobot.cpp.o: In function `loop’:
C:\Program Files (x86)\Arduino/myrobot.ino:272: undefined reference to `Michelino::Robot::run()’
collect2.exe: error: ld returned 1 exit status
Error compiling.

Solution
The problem is that the cpp file should not have the word class in it and only the header file.

Original code :

namespace test
{
class Ctest
{
public:
Ctest() {};
void a() {};
};
};

test.h
#ifndef rocketbot_remote_control_h
#define rocketbot_remote_control_h
namespace test
{
class Ctest
{
public:
// Ctest();
void a();
};
};
#endif

main

#include “test.h”

using namespace test;
test::Ctest r;
//Ctest r;

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:
r.a();
}

Fixed Code
Test.cpp
#include “test.h”
namespace test
{
//void Ctest::Ctest() {};
void Ctest::a() {};
};

Test.h
#ifndef rocketbot_remote_control_h
#define rocketbot_remote_control_h
namespace test
{
class Ctest
{
public:
// Ctest();
void a();
};
};
#endif

Main
#include “test.h”

using namespace test;
test::Ctest r;
//Ctest r;

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:
r.a();
}

Error 2 – Function not found

Arduino: 1.6.5 (Windows 8.1), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

In file included from robot_vehicle_with_bth.h:61:0,
from myrobot.ino:55:
rocketbot_remote_control.h:11: error: no matching function for call to ‘SoftwareSerial::SoftwareSerial()’
SoftwareSerial BTSerial;
^
rocketbot_remote_control.h:11:16: note: candidates are:
In file included from robot_vehicle_with_bth.h:34:0,
from myrobot.ino:55:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.h:90:3: note: SoftwareSerial::SoftwareSerial(uint8_t, uint8_t, bool)
SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false);
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.h:90:3: note: candidate expects 3 arguments, 0 provided
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.h:47:7: note: SoftwareSerial::SoftwareSerial(const SoftwareSerial&)
class SoftwareSerial : public Stream
^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.h:47:7: note: candidate expects 1 argument, 0 provided
no matching function for call to ‘SoftwareSerial::SoftwareSerial()’
Solution
Add extern keyword in header file
extern SoftwareSerial BTSerial;

Error 3 — redefinition of ‘class Michelino::RemoteControl’
Arduino: 1.6.5 (Windows 8.1), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

In file included from myrobot.ino:56:0:
rocketbot_remote_control.h:14: error: redefinition of ‘class Michelino::RemoteControl’
class RemoteControl : public RemoteControlDriver
^
In file included from robot_vehicle_with_bth.h:61:0,
from myrobot.ino:55:
rocketbot_remote_control.h:14: error: previous definition of ‘class Michelino::RemoteControl’
class RemoteControl : public RemoteControlDriver
^
redefinition of ‘class Michelino::RemoteControl’

Solution :
Fix to add the following since header file gets included multiple times
#ifndef rocketbot_remote_control_h
#define rocketbot_remote_control_h
….
#endif

Error 4
x.cpp file
robot_vehicle_with_bth.cpp:77: error: ‘Robot’ has not been declared
void Robot::Robot()

Solution
Solution is to include x.h file
#include “x.h”

Stay tuned more fun ones coming!