B4R Question Can't make log working

fransvlaarhoven

Active Member
Licensed User
Longtime User
Hello,

it probably is a stupid error of me but i can't make log working: i have an original Arduino Mega2560 rev.3 board running the most basic program possible:


Sub Process_Globals
Public Serial1 As Serial
Public Timer1 As Timer
End Sub

Private Sub AppStart
Serial1.Initialize(115200)
Timer1.Initialize("Timer1_Tick", 2000)
Timer1.Enabled = True
Log("AppStart")
End Sub

Private Sub Timer1_Tick
Log("Timer1_Tick")
End Sub


********************* PROGRAM STARTING ****************

is the last message i see in the logs.

But the TX-led on the board is blinking so something seems to happen....

compiling an even simpler program generates the same error



1601484159435.png


writing a small program in the arduino IDE that sends data to the serial port seems to work and the data is received in the log-window of B4R.

Is this a bug in B4R?
What is going wrong?
 
Last edited:

Michael1968

Active Member
Licensed User
Longtime User
do you set the correct baud rate in the "boardselect" section?

what mean the error message in english?
best regards
Michael
 
Upvote 0

fransvlaarhoven

Active Member
Licensed User
Longtime User
Hello,

yes, i did set the baudrate in the "boardselect"section. I also played with lower baudrate settings but without result.

The Arduino is sending the log data to the serial port: when i monitor the serial port with the serial monitor build into the IDE of Arduino, the that seems to work.

Even more: when I run a small program on the Arduino ( written with the IDE of Arduino) that sends information to the serial port and I start B4R without compiling and running a program, the data that is sended by the Arduino is received and commes in the log-window of B4R

It seems to be that there is a bug in B4R: when you compile a program with B4R and send it to the Arduino; the log-window of B4R becomes disconnected from the serial port.

In englisch the error message means "the name of the directory is not valid", my guess is that that points to the problem
 
Upvote 0

fransvlaarhoven

Active Member
Licensed User
Longtime User
installed the tool and this works perfect. As far as I can see, the problem must be somewhere at the end of the upload-step in the IDE of B4R

Just to make sure, i reinstalled B4R and Arduino IDE 1.8.12 but the problem stays.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
@fransvlaarhoven try also to set the baudrate in your code to 9600.

Serial to 9600baud:
Serial1.Initialize(9600)

Another problem for the directory you place the selected code might be that it is placed in an area prohibited by the system. F.e. "Program Files". I would try to run B4R as administrator. Also try to save your program in a directory without spaces f.e. "C:\B4X\B4R\MyCode\"
 
Last edited:
Upvote 0

fransvlaarhoven

Active Member
Licensed User
Longtime User
i already tried to lower the baudrate and running B4R as administrator but that did not work. My guess is that somewhere the naming of the serial port is wrong but i have no real clue.
For the time being, Erel's tool works perfect.
 
Upvote 0
Top