Tag Archives: workinprogress

Finally something we can use!

Sorry guys. This post will be brief and contain some little technical detail. Some things will be confusing because I’m still working on straightening things out.

Mega_Man_Running_by_Probocaster
If I could be any video game character, it would probably be Megaman

https://github.com/dharbott/ASCOM-Telescope-Driver
https://github.com/dharbott/Arduino-Telescope-Driver

Here’s the ASCOM Telescope Driver code. And then there’s the Arduino Telescope Driver code. You’ll need both, to operate the Motorized Telescope Project. I’m putting it online so you can access it there, and watch my slow progress. It is really messy in some places, but once it’s done I’ll clean it up nice and proper.

 

Just to be clear, the ASCOM driver is not finished. It’s barely 15%-20% complete. I’m working on details for byte transmission protocol between Arduino and ASCOM Driver. It must also be able to process, format, and send Single Floating point 32-bit numbers over Serial communication, and receive and process it on the Arduino end. Otherwise, we can’t send local RaDec degrees to the Arduino. The alternative is we only send raw 16-bit unsigned ints, which technically works, but by principle of modular design the Arduino should receive degree-based commands, and be less dependent on the ASCOM Driver for certain tasks. This is the hardest part, but once it’s done, everything else should be alright

 

Notes on data types :
Arduino char -> 8-bit signed, ASCII 
C# char -> 16-bit unsigned UNICODE
Arduino float -> 32-bit single precision floating point 
C# single -> 32-bit single precision floating point
Arduino double -> doesn't exist 
C# double -> 64-bit double precision floating point
Arduino int -> 16-bit integer 
C# int -> 32-bit integer
Arduino microcontroller - LittleEndian byte encoding 
My Computer i3 processor (?) - LittleEndian byte encoding
Arduino Serial.write(...) -> sends byte data, serially 
C# Serial.TransmitBinary(...) -> sends byte data, serially
Arduino Serial.read() -> reads in one byte of data 
C# Serial.ReceiveByte() -> reads in one byte of data
Arduino processing -> weak 'typed' language 
C#, .NET -> strong 'typed' language
strong 'typed' language : less freedom, more security - also means we must use proper, logical, and hopefully efficient data type agreement throughout the entire driver
megaman gif

 

Leave a comment!