Coder Social home page Coder Social logo

jeroenwalter / arduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from solidsoils/arduino

1.0 1.0 3.0 7.71 MB

C# .NET - Arduino library supporting simultaneous serial ASCII, Firmata and I2C communication

Home Page: https://solidsoils.github.io/Arduino/index.html

License: BSD 2-Clause "Simplified" License

C++ 1.09% C# 98.91%

arduino's People

Contributors

formator avatar hhgyu avatar mjlhthomassen-eurocom avatar solidsoils avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

arduino's Issues

Automatically reconnect

If, for some reason, the connection to the Arduino is lost, it may be nice to have some form of automatic reconnect mechanism.
Maybe also automatically do a new discovery of the Arduino device.
i.e.:
reconnect to last known serial port.
if that fails, find the first serial port that supports firmata.

Remove IStringProtocol from ArduinoSession

Because IStringProtocol has nothing to do with Firmata and you should not combine 2 communication protocols on the same connection. Firmata already has the ability to send strings.

More clearly separate Firmata from non-Firmata connection

Currently this library mainly does Firmata connections on an Arduino.
But it also has the ability to open a normal serial connection to an Arduino.
In my opinion that is something this library doesn't need.

It should solely focus on Firmata connections, because a normal serial connection to an Arduino can be created via the System.IO.Ports.SerialPort class.

The only reason to keep the current basic serialport functionality is for the EnhancedSerialPort fixes for Mono. I don't know if these are still necessary, I find it very strange if Mono wouldn't have fixed this in the previous years.

I also propose to rename this package to a name that has Firmata in it.
And as Firmata is only a protocol and doesn't depend on an Arduino, Arduino may even be dropped from the package name.

Don't throw exceptions in worker threads and not catch them....

Some methods in ArduinoSession throw exceptions in a worker thread while handling responses or waiting for a response (e.g. EnqueueReceivedString throws TimeoutException).
These exceptions aren't caught and cause the program to quit.
In most cases the error is recoverable, but by throwing exceptions in a worker thread, we have less control over the exception handling.
Don't throw exceptions here, we control the flow of the program, so can also generate an error event or something else.

Remove unused classes.

For example ByteArrayExtensions.cs is only used by test projects. Can be removed safely.

stepper motors support

hi thanks for amazing project , am working stepper motors , so can i control stepper motors with it ? if not how can we add stepper motor support to it

thanks

ArduinoSession.GetMessageFromQueue

TODO: find out if this method still works correctly when waiting for a reply on a message, while the arduino is also constantly sending other (sysex) messages.

Trouble to compile netcore3 branh

I'm in trouble to compile netrcore3 brach ... i tried with Framework 4.6.1 - Net Standard 2.0 because can't compile it in 4.7.2/4.8 or standard 2.1 but there is an error in IFirmataProtocol to use C#8.

It can't use "default interface" in c# 7.3 to implement:
SendSysExWithReply(SysEx message, Func<SysEx, bool> replyCheck, int? timeoutMs)

Have you got any idea about that?

Fix SysEx Payload encoding

Old firmata versions encoded the sysex payload as 2 7-bit bytes per byte.
That has changed somewhere in newer versions.
This may affect string encoding as well, so check that as well.

ArduinoSession.Dispose() should also dispose its connection, if it owns it.

The SerialConnectionFinder returns ArduinoSessions instead of a serial connection.
The (serial) connection is no longer part of the interface, it is demoted to be an internal aspect of the ArduinoSession.
The rationale is that the serial connection typically only lives as long as the ArduinoSession. If you dispose of the ArduinoSession, the serial connection is also closed. Might as well dispose it then.

Also, SerialConnectionFinder should be renamed to FirmataFinder to emphasize the change in its interface of returning ArduinoSessions instead of serial connections.

ObservableEventTrackers are not tested

For example, ObservableArduinoSessionTester contains a test that does nothing.
Why are there even Observables in ArduinoSession, while there are also event for the same things?
I.e. CreateAnalogStateMonitor() vs event AnalogStateReceived ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.