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.
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!
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:
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:
- in helper.h comment out line 14 (the include)
- in helper.cpp comment out lines 25,26,27 (the only references to softwareserial)
When i do that, the example sketch compiles.
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!