Hi, i programm NetDuino in basic, with VisualStudio. No problems at all.Hi ,i program Arduino in C . Arduino has low memory, i love Erel's work but i think that programmig Arduino in basic language reduces the available "program memory"
Hi, i programm NetDuino in basic, with VisualStudio. No problems at all.Hi ,i program Arduino in C . Arduino has low memory, i love Erel's work but i think that programmig Arduino in basic language reduces the available "program memory"
This is, i think, without .NET ? I programm NetDuino (similar to Arduino), with basic, VisualStudio 2013, but i need to load MicroFramework.This is a preliminary test of a possible new development tool for Arduino devices (B4R).
Do you plan to make it as a free product? Arduino is free.There is still quite a lot of work ahead. It will take some time.
It is really too soon to say...Like a Microchip PICs ?
It is not related to .Net.This is, i think, without .NET ?
Yes.Do you plan to make it as a free product?
Can I pay anything nonetheless?It is not related to .Net.
Yes.
Can I pay anything nonetheless?![]()
I see it in a different way. I want the B4X suite to be as popular as possible. B4R as a free tool will help with encouraging developers to use B4X tools for development.Sometimes I think @Erel is far too generous
There will be no debugger in the first version (note that there is also no debugger in Arduino IDE).how would the debugger work?
This is true.incredibly memory efficient
It uses Arduino IDE command line tool to upload the project. This is similar to how B4A uses Android SDK to upload the APK (in USB debug mode).and the uploader for the sketch?
Maybe a donationware could be an idea. The same can apply to B4J.Sometimes I think @Erel is far too generous.
What do you mean with 'it' ? The IDE is the same IDE as the other products.Is it done with B4J?
Yes I mean the IDE. But I still believe the best way to promote your products is to show complete and real applications build with it.What do you mean with 'it' ? The IDE is the same IDE as the other products.
show complete and real applications build with it.
Sub Process_Globals
Public Serial1 As Serial
Dim eth As Ethernet
Dim sock As EthernetSocket
Dim Astream As AsyncStreams
Dim pins(3) As Pin
Dim btn As Pin
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Dim pinNumbers() As Byte = Array As Byte(pins(0).A0, pins(0).A1, pins(0).A2)
For i = 0 To pins.Length - 1
pins(i).Initialize(pinNumbers(i), pins(i).MODE_OUTPUT)
pins(i).DigitalWrite(True)
Next
btn.Initialize(btn.A3, btn.MODE_INPUT_PULLUP)
btn.AddListener("Btn_StateChanged")
Log("Trying to connect...")
If eth.InitializeDHCP(Array As Byte(0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED)) = False Then
Log("Error getting ip address.")
Else
If sock.ConnectIP(Array As Byte(192, 168, 0, 8), 51042) = False Then
Log("Error connecting")
Else
Log("Connected")
Astream.Initialize(sock.Stream, "Astream_NewData", "Astream_Error")
End If
End If
End Sub
Sub Btn_StateChanged (State As Boolean)
Dim b(1) As Byte
If State Then b(0) = 1 Else b(0) = 0
Astream.Write(b)
End Sub
Sub Astream_NewData (Buffer() As Byte)
Dim bc As ByteConverter
Log("NewData: ", bc.HexFromBytes(Buffer))
For i = 0 To Buffer.Length - 1 Step 2
Dim b As Boolean
If Buffer(i + 1) = 1 Then b = True Else b = False
pins(Buffer(i)).DigitalWrite(b)
Next
End Sub
Sub Astream_Error
Log("Error")
End Sub
Sub Process_Globals
Private server As ServerSocket
Private astream As AsyncStreams
End Sub
Sub Globals
Private Switch1 As Switch
Private Switch2 As Switch
Private Switch3 As Switch
Private Switches As List
Private lblButton As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
Switches = Array(Switch1, Switch2, Switch3)
If FirstTime Then
server.Initialize(51042, "server")
server.Listen
Log($"My ip: ${server.GetMyWifiIP}"$)
End If
End Sub
Private Sub Server_NewConnection (Successful As Boolean, NewSocket As Socket)
Log($"NewConnection: ${Successful}"$)
If Successful Then
If astream.IsInitialized Then astream.Close
astream.Initialize(NewSocket.InputStream, NewSocket.OutputStream, "astream")
For Each s As Switch In Switches
s.Checked = True
Next
End If
server.Listen
End Sub
Sub Switch_CheckedChange(Checked As Boolean)
Dim i As Int = Switches.IndexOf(Sender)
If astream.IsInitialized Then
Dim b As Byte
If Checked Then b = 1 Else b = 0
astream.Write(Array As Byte(i, b))
End If
End Sub
Private Sub AStream_NewData (Buffer() As Byte)
If Buffer(0) = 1 Then lblButton.Text = "Button Up" Else lblButton.Text = "Button Down"
End Sub