Sensor builder help needed please!

I am building a project using sensor builder hardware and came with errors.
I thought the job will work out of the box but l have some issues

I am using the sunlight sensor. Here is the sensorbuilder.ino:

#include <Arduino.h>
#include “sensorBuilder.hpp”
SensorBuilderClass SensorBuilder;
void setup(){
Serial.begin(115200);
SensorBuilder.check_grove();
Serial.println(“SensorBuilder add Sunlight”);
sensorSunlight *sunlight = new sensorSunlight();
SensorBuilder.addSensor(sunlight);
sensorNew *newSensor = new sensorNew();
SensorBuilder.addSensor(newSensor);
SensorBuilder.begin();
}
void loop(){
SensorBuilder.poll();
}

Here are the errors:

In file included from /home/pangaea/Arduino/libraries/Seeed_Arduino_S2110/src/sensorBuilder.hpp:12,
from /home/pangaea/Desktop/sensorBuilder/sensorBuilder.ino:2:
/home/pangaea/Arduino/libraries/Seeed_Arduino_S2110/src/sensor/sensorSunlight.hpp: In member function ‘virtual bool sensorSunlight::sample()’:
/home/pangaea/Arduino/libraries/Seeed_Arduino_S2110/src/sensor/sensorSunlight.hpp:72:24: error: ‘class Si115X’ has no member named ‘ReadHalfWord’
72 | float IR = _si1151.ReadHalfWord();
| ^~~~~~~~~~~~
/home/pangaea/Arduino/libraries/Seeed_Arduino_S2110/src/sensor/sensorSunlight.hpp:73:25: error: ‘class Si115X’ has no member named ‘ReadHalfWord_VISIBLE’
73 | float VLR = _si1151.ReadHalfWord_VISIBLE();
| ^~~~~~~~~~~~~~~~~~~~
/home/pangaea/Arduino/libraries/Seeed_Arduino_S2110/src/sensor/sensorSunlight.hpp:74:24: error: ‘class Si115X’ has no member named ‘ReadHalfWord_UV’
74 | float UV = _si1151.ReadHalfWord_UV();
| ^~~~~~~~~~~~~~~
/home/pangaea/Desktop/sensorBuilder/sensorBuilder.ino: In function ‘void setup()’:
/home/pangaea/Desktop/sensorBuilder/sensorBuilder.ino:62:3: error: ‘sensorNew’ was not declared in this scope; did you mean ‘sensorUV’?
62 | sensorNew *newSensor = new sensorNew();
| ^~~~~~~~~
| sensorUV
/home/pangaea/Desktop/sensorBuilder/sensorBuilder.ino:62:14: error: ‘newSensor’ was not declared in this scope
62 | sensorNew *newSensor = new sensorNew();
| ^~~~~~~~~
/home/pangaea/Desktop/sensorBuilder/sensorBuilder.ino:62:30: error: expected type-specifier before ‘sensorNew’
62 | sensorNew *newSensor = new sensorNew();
| ^~~~~~~~~

exit status 1

Compilation error: ‘sensorNew’ was not declared in this scope; did you mean ‘sensorUV’?

I also followed the steps here:

Paragraph Step 2 is confusing…
" Define the sensor class and implement the init() and sample() functions.
The sensor class should inherits from the sensorClass class, and implement the init() and sample() functions."

How and where do I have to implement that?

Is any example to have all the steps and all the code needed to implement sensors on sensor builder platform?
Thank you

You’re missing a #include for the sensor driver, check the .ino here

Hello, I have the SenseCAP Sensor Builder and need to use it to set up a sunlight sensor with Modbus RTU communication. I’m not very good with Arduino. I need step-by-step help on what to change in the configuration files to make it work.

Best regards,

Mariushol

  1. Senscap sensor builder is for making your own devices, but it requires you to program the device yourself, including communications to your target Mosbus device, there is no step to step guide to doing this, it’s a skilled embedded engineering task.
  2. Check the seeed Wiki, it’s got excellent instructions on all of their devices.
  3. Which Xiao module are you using? What model sensor? What is the device is taking to over Mosbus?
  4. Program a seed studio Xiao module to read a grove sensor, get it working on your desk.
  5. Program that same module to send the information to your modbus endpoint.
  6. Install that stuff inside the senscap sensor builder.

At least that’s my understanding from looking at the documentation.

Follow the wiki steps for setup and then ask Claude for help getting it working in vscode or Arduino IDE, depends which chip you picked.

2 Likes

:grin: There is Now…
Nice walk thru m y guy @Toastee0 :+1:

If the OP does that :face_with_monocle: :clipboard: (1- 6) he’s on his way.

GL :slight_smile: PJ :v: