SoftwareSerial compile (file not found) error workaround with D21G want to connect to BoltIOT device

I was hoping to connect the IND/IO D21G controller to one of my BoltIOT devices and write some of my sensor information to their cloud site. The problem is softwareserial is interlaced all in through their .h file and their .cpp file. so even if I connect to a standard RX/TX set of pins, it hangs up on those references. https://github.com/Inventrom/boltiot-arduino-helper/tree/master/src

I wished I knew how to port this over to make it work with these controllers, it woudl be a fairly clean way of getting data to the cloud. Communicate with the Bolt device through serial RX/TX and let it do the data parsing on the other end and display it on their website. Not quite as powerful as say the Particle IO devices, but this is simple but solid.

 

Thanks

Kelly

 

 

 

Kelly Sprayberry
Kelly Sprayberry
34
| 2 1 2
Asked on 1/10/19, 5:31 PM
0
vote
2329 Views

Awesome! I’ll give this a try and see what happens. It would be neat to have a cloud connection to my project using the Bolt device. Thank you for digging into it. Kelly ....Update! I tried it and I'm flying! Woohoo!

 

 

 

 

Kelly Sprayberry
Kelly Sprayberry
34
| 2 1 2
Answered on 1/11/19, 1:15 AM
0
vote

Hi, the library you refer to allows both software and hardware serial and in fact, they recommend hardware serial.

On the INDIO D21G, you can use the 'Serial' on D0/D1 but that is by default connected to the RS485 port. If you want to use it for other purposes, you have to change the hardware switch on the baseboard. https://github.com/Industruino/libraries#rs485

An easier solution is to use 'Serial1' on D10/D5 also available on the IDC expansion port. 

As far as i can see in the examples, you can initialise it with:
boltiot.begin(Serial1);

Now indeed the SoftwareSerial library is not available for D21G (same MCU as Arduino M0) because the idea is that there are enough hardware serials. But your library requires the softwareserial library to be present. It's fairly easy to bypass that requirement:

  1. in helper.h comment out line 14 (the include)
  2. in helper.cpp comment out lines 25,26,27 (the only references to softwareserial)

When i do that, the example sketch compiles.

Tom
Tom
5675
| 1 1 3
Answered on 1/10/19, 11:26 PM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

54 follower(s)

Stats

Asked: 1/10/19, 5:31 PM
Seen: 2329 times
Last updated: 1/11/19, 1:05 PM