I recently bought an "arduino" Nano Every. There was some things that were puzzling and it turns out it is a CLone made by Thinary (Thinary Nano Every).
Loaded the specification/driver (source: Github) in the Arduino IDE and did some tests - aiming in the end to use this board as a learning exercise for B4R.
I found that the arduino sketch would load onto the board (Arduino IDE - indicating the serial comm works), however, nothing shows up in the Serial Monitor.
After some time banging at that, I just moved to B4R IDE. Am able to select the board and the COM port etc (or it was auto-recognised).
Using a test sketch from Klaus's booklet (as below) I then encountered a different problem that I can't explain.
The code is this : (and pretty simple with only Core library required apparently) :
On the debug side I get this : The following is just the bit that seems most relevant to the query (the full debug capture is in the attachment).
So, the puzzling part is
B4RArduino.cpp:48:32: error: cannot convert 'bool' to 'PinStatus' for argument '2' to 'void digitalWrite(pin_size_t, PinStatus)'
digitalWrite(PinNumber, Value);
I thought I would comment out the pin13.DigitalWrite lines in the code and the Debug still showed the same error.
I also thought, so it needs two parameters in DigitalWrite and go this in the log when I added pin13 as a first parameter (though its the wrong type for that first parameter) :
Couldn't spot anything in the full debug log that showed some failure in the TRACE/DEBUG.
Pretty certain I have the latest version of B4R and its libraries.
I could have missed adding a library but when I added several they just all showed up as Unused in the log - hence it seemed that this was an unlikely error on my part.
At this point the issue can't be unrelated to the hardware (ie the clone device) - the sketch has not compiled and tried to upload (yet).
Any assistance welcomed : thanks.
Loaded the specification/driver (source: Github) in the Arduino IDE and did some tests - aiming in the end to use this board as a learning exercise for B4R.
I found that the arduino sketch would load onto the board (Arduino IDE - indicating the serial comm works), however, nothing shows up in the Serial Monitor.
After some time banging at that, I just moved to B4R IDE. Am able to select the board and the COM port etc (or it was auto-recognised).
Using a test sketch from Klaus's booklet (as below) I then encountered a different problem that I can't explain.
The code is this : (and pretty simple with only Core library required apparently) :
Test sketch (B4R booklet):
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
'Ctrl+Click to open the C code folder: ide://run?File=%WINDIR%\System32\explorer.exe&Args=%PROJECT%\Objects\Src
Sub Process_Globals
Public Serial1 As Serial
Private pin13 As Pin
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
pin13.Initialize(13, pin13.MODE_OUTPUT)
LedOn(0)
End Sub
Private Sub LedOn (tag As Byte)
pin13.DigitalWrite(True)
CallSubPlus("LedOff", 1000, 0)
End Sub
Private Sub LedOff(tag As Byte)
pin13.DigitalWrite(False)
CallSubPlus("LedOn", 1000, 0)
End Sub
On the debug side I get this : The following is just the bit that seems most relevant to the query (the full debug capture is in the attachment).
"K:\\B4R-PR~1\\xxxxxxx\\Objects\\bin\\sketch\\Scheduler.cpp" -o "K:\\B4R-PR~1\\xxxxxxx\\Objects\\bin\\sketch\\Scheduler.cpp.o"
K:\B4R-PR~1\xxxxxxx\Objects\src\B4RArduino.cpp: In member function 'void B4R:in:igitalWrite(bool)':
B4RArduino.cpp:48:32: error: cannot convert 'bool' to 'PinStatus' for argument '2' to 'void digitalWrite(pin_size_t, PinStatus)'
digitalWrite(PinNumber, Value);
^
Using library SoftwareSerial at version 1.0 in folder: C:\Users\RabbitBush\AppData\Local\Arduino15\packages\thinary\hardware\avr\1.0.0\libraries\SoftwareSerial
exit status 1
So, the puzzling part is
B4RArduino.cpp:48:32: error: cannot convert 'bool' to 'PinStatus' for argument '2' to 'void digitalWrite(pin_size_t, PinStatus)'
digitalWrite(PinNumber, Value);
I thought I would comment out the pin13.DigitalWrite lines in the code and the Debug still showed the same error.
I also thought, so it needs two parameters in DigitalWrite and go this in the log when I added pin13 as a first parameter (though its the wrong type for that first parameter) :
Main - 19: Cannot cast type: {Type=Pin,Rank=0, RemoteObject=True} to: {Type=Boolean,Rank=0, RemoteObject=True}
Main - 23: Cannot cast type: {Type=Pin,Rank=0, RemoteObject=True} to: {Type=Boolean,Rank=0, RemoteObject=True}
Couldn't spot anything in the full debug log that showed some failure in the TRACE/DEBUG.
Pretty certain I have the latest version of B4R and its libraries.
I could have missed adding a library but when I added several they just all showed up as Unused in the log - hence it seemed that this was an unlikely error on my part.
At this point the issue can't be unrelated to the hardware (ie the clone device) - the sketch has not compiled and tried to upload (yet).
Any assistance welcomed : thanks.