Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Is there any way to add elements so that SimulIDE understands that they are part of the library?

2 posters

Go down  Message [Page 1 of 1]

Maiza

Maiza

I have my own board here and I'm using it to put it in SimulIDE, I based it on the Arduino Uno.

To use the serial monitor on this board of mine, a library called HID Serial is used.

#include < HIDSerial.h >
HIDSerial serial;

and in it, there are elements that were modified to use the serial monitor, for example:

When we add Serial.begin(9600);

it goes like this:

void setup(){
Serial.begin(9600);
}

In this library, to use this syntax, it would look like:

#include < HIDSerial.h >
HIDSerial serial;

void setup(){
serial.begin();
}

That in the case "serial.begin();" is the same thing as "Serial.begin(9600);"

Is there any way to add it to the simulide so that it understands this syntax so that I can use it? Because I compile it for simulide, it doesn't work.

https://maizavitoria.com.br

arcachofo

arcachofo

Is there any way to add it to the simulide so that it understands this syntax so that I can use it?
Usually you don't need to add nothing to simulide, just install the libraries in Arduino IDE or manually.

Because I compile it for simulide, it doesn't work.
To know what is happening better copy/paste here the whole output from the bottom panel.

Maiza

Maiza

I will send photos so you can understand.

On my board, the serial monitor does not work natively to the Arduino IDE. I use a Java tool to view the serial monitor information

Therefore, the serial monitor is inaccessible by the Arduino IDE.

Is there any way to add elements so that SimulIDE understands that they are part of the library? 01_duv10


Is there any way to add elements so that SimulIDE understands that they are part of the library? 02_duv10

I would like the same code that I put in the Arduino IDE to work in Simulide but with the serial monitor. It's not possible, right?

What would be the best way? to be able to use my board in simulIDE? use without the library?

Regarding the output, it does not present any errors. The issue is just that the serial monitor in the simulide doesn't work. I believe it's because of the application, right?

The idea of the project is to use my board with SimulIDE, because in the social project in which I use it, many people do not have access to the internet and do not have a good accessible computer to use. And SimulIDE, in addition to being completely free, is very lightweight and therefore works on any computer.

https://maizavitoria.com.br

arcachofo

arcachofo

Thanks for the pictures, now I see what you are doing.

A few years ago I was using a simple Atmega328 board as an alternative for Arduino.
It had no serial to USB converter, instead it used USBaspLoader to upload hex files:
https://metalab.at/wiki/Metaboard

I think your board is something similar (Mobhuino), so now I understand what you are doing.
Unfortunately HIDSerial is nothing about serial, it implements the USB protocol and there is nothing in SimulIDE about USB, so there is no way to watch that data.

Maiza

Maiza

Yes, it uses USBasp. So, really, the best way would be to use it without the library? Normally with the simulide serial monitor? It works without the library perfectly.

https://maizavitoria.com.br

arcachofo

arcachofo

Yes, it uses USBasp. So, really, the best way would be to use it without the library? Normally with the simulide serial monitor? It works without the library perfectly.
You can use the normal serial library with the Serial Monitor in SimulIDE, but depending on the project it could interfere with the circuit because USBasp uses PD2 and PD4 but Serial uses PD0 and PD1.
So if you use the normal Serial library then you can't use  PD0 and/or PD1 in the circuit.

Maiza

Maiza

Mine here doesn't use PD2 and PD7, the Usbasp pins. I used 0 and 1 for RX and TX, but using the library in the code editor in the SimulIDE panel didn't work. The Serial monitor worked without using the library I need on my board.

https://maizavitoria.com.br

arcachofo

arcachofo

Ok, then:

- HIDSerial library uses PD2 and PD7.
This means that if you use this library then you can't use those pins in your projects.
But you can use PD0 and PD1 for whatever you want.

- Default Serial in Arduino uses PD0 and PD1.
So if you use Serial.begin(), Serial.print(), etc, then you can use Serial Monitor, but you can't use PD0 and PD1 in your projects.

So if someone is already using PD0 and/or PD1 in a project and tries to use Serial.begin(), Serial.print(), etc, then the project will not work correctly.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum