terça-feira, 7 de fevereiro de 2023

VISUINO + PICSIMLAB (SENDING HELLO TO MQTT SERVER) USING SHIELD W5500

 

PICSIMLAB WITH VISUINO

PICSimLab is a realtime emulator of development boards with MPLABX/avr-gdb debugger integration. PICSimLab supports microcontrollers from picsim, simavr, uCsim, qemu-stm32, qemu-esp32, and gpsim. PICSimLab has integration with MPLABX/Arduino IDE for programming the microcontroller's boards. As the purpose of PICSimLab is to emulate real hardware it does not have any source code editing support. For code editing and debugging the same tools used for a real board should be used with PICSimLab, such as MPLABX, Arduino IDE, or VSCode with PlatformIO.
PICSimLab supports several devices (spare parts) that can be connected to the boards for simulation. Such as example LEDs and push buttons for simple outputs and inputs and some more complex ones like the ethernet shield w5500 for internet connection or the color graphic display ili9340 with touchscreen. The complete list of parts can be accessed in the documentation.


VISUINO
Visuino is the latest innovative software from Mitov Software. A visual programming environment that allows you to program your Arduino boards.
The components found in the Visuino software represent your hardware components and you will be able to easily create and design your programs using drag and drop. No equipment or hardware is required to run the software in design mode. Once you have completed the design, you can connect the Arduino board upload and run it.
For those people who are not strong in writing code then designing, compiling and creating Arduino programs has never been easier! Why waste time coding when all the hard work is done for you? You've got your Arduino board and great hardware design, get it up and running in minutes, not hours!
How to run Visuino code on PICSIMLAB ?
Download and Install the PICSIMLAB
(Arduino EMULATOR)

  • UPLOAD OF HEX BY SERIAL 

Download and install Virtual COMM
(Will created a bridge between two VIRTUAL COMM, one will be used by the PICSIMLAB and other will be used by the VISUINO), both to UPLOAD and LOGS.


In this case, i created a COM27 (reference on Visuino) and COM28 (reference to PICSIMLAB), pay attention to CHECKBOX  (use Port Class and enable buffer overrun).



Execute PICSIMLAB e select on File menu Configure, one of Virtual COMM created, in this case COM27.



Change too the Clk (MHz) to 16


Execute now Visuino and select the Virtual COMM28, wich is bridged with PICSIMLAB Virtual COMM27.
In Visuino Project a 1Hz Blink on Arduino LED (13) is created, compile it.

In the PICSIMLAB, you need to download the Arduino Bootloader, yes, need first run the BOOTLODER to allow the UPLOAD :)


On Visuino, select COMM28, and make the UPLOAD.



You will see the LED Builtin Blinking on PICSIMLAB
  • UPLOAD OF HEX BY File Load Hex on PICSIMLAB

If the VIRTUAL COMXX not work for you, choose the File Load Hex option in PICSIMLAB and Load the HEX file created by VISUINO.

To know where is the HEX file created by Arduino, click here


You will see the LED Builtin Blinking on PICSIMLAB

Video



Making a better experiment with VISUINO + PICSIMLAB

"Connecting to MQTT and sending a HELLO, using ETHENET W5500 Shield"

MQTT

Para os dispositivos de Internet das Coisas (IoT), a conexão com a Internet é um requisito. A conexão com a Internet permite que os dispositivos trabalhem entre si e com serviços de backend. O protocolo de rede subjacente da Internet é o TCP/IP. Desenvolvido com base na pilha TCP/IP, o MQTT (Message Queue Telemetry Transport) tornou-se o padrão para comunicações de IoT.

Arduino W5500 Shield

The Arduino Ethernet Shield 2 connects your Arduino to the internet in mere minutes. Just plug this module onto your Arduino Board, connect it to your network with an RJ45 cable (not included) and follow a few simple steps to start controlling your world through the internet. As always with Arduino, every element of the platform – hardware, software and documentation – is freely available and open-source. 

Here the Project

Adding the W5500 Shield to Arduino Uno


W5500 Shield

Setting the TCP Client Socket to the MQTT BROKER

Broker: broker.hivemq.com

TCP Port: 1883

Topic created was /testtopic/99 on BROKER MQTT, Visuino will publish on that!

Adding the W5500 on PICSIM LAB, choose Module-->Spare Parts




Setting the GPIOS

Pay attention that is MISO--->MISO, MOSI--->MOSI :)
And Visuino does not use all GPIOS

Warning! (Ethernet Link), and please, don´t close my window :)

Compiling, transfering to PICSIMLAB the HEX


I choose in this applicaton to use LOAD HEX, but you can use the UPLOAD option using the COMM Serial Bridge too

Executing

See on MQTT BROKER the message

Topic testtopic/99 created

Video

Better Resolution on YouTube

Visuino Project download

mqtt.visuino

PICSIMLAB  Project download

mqtt.pzw

References

PICSimLab - Prog. IC Simulator Lab. download | SourceForge.net

Home - Visuino - Visual Development for Arduino

Ethernet Shield W5110 & SD Card at Rs 475 | Arduino Shield in Mumbai | ID: 15283302848 (indiamart.com)

HiveMQ - Enterprise ready MQTT to move your IoT data

https://www.hivemq.com/public-mqtt-broker/

https://lcgamboa.github.io/picsimlab_docs/0.8.12/ETHw5500.html

Thanks 

Carlos Gamboa to PICSIMLAB support and fixes

Nenhum comentário:

Postar um comentário