{"id":43298,"key":"Spectruino_protocol:MOST","title":"Spectruino protocol:MOST","latest":{"id":1208316,"timestamp":"2025-11-27T23:55:17Z"},"content_model":"wikitext","license":{"url":"https://www.appropedia.org/Appropedia:Copyrights","title":"CC-BY-SA-4.0"},"source":"{{MOST}}\n\nSpectruino is an [[Arduino]] Spectrometer to measure light intensity vs. wavelength. Internally, this is achieved through a combination of diffraction grating with linear CCD camera and custom firmware. All technical specs here: http://myspectral.com/#technical\n\nWe are beta testing for them.\n\n== Setup ==\n\n=== Installation Instructions for [[Arduino]] ===\n\n* Install Ardunino Nano Drivers: http://arduino.cc/it/Guide/Windows#toc4\n* FTDI Drivers for your OS can be found on: http://www.ftdichip.com/Drivers/VCP.htm\n\n=== Installation Instructions for mySight software Analyzer ===\n\n* download from https://github.com/methoxid/mySight (Updated 30. July 2012)\n* run the software in a subfolder, application.windows32/mySight.exe\n\n== Calibration ==\n\n* Copy and paste the file \"CFG-spectruino-calibration.txt\" into the main folder of mySight application.\n* If you use Processing source file, paste it into the /mySight/ folder and run the sketch.\n* The file contains calibration parameters and the serial number of your device.\n* You should now see wavelength [nm] in the main graph window of the mySight application.\n* If you experience any trouble, please install Processing language from http://processing.org/download/ and ping Spectruino on email if you need help.\n* Note: constantly updating the software on github, please check back soon.\n* open and edit mySight/mySight.pde\n\n=== Software performs the following ===\n\n# open serial ports, find Spectruino\n# read-in stream of bytes from virtual serial port over USB cable\n# split the incoming byte stream into a byte array of length 501, check if the HEADER bytes are present and contain the correct size of the array \"501\" and \"501\"\n# construct Spectrum class from byte array\n# plot Spectrum\n# wait for keypress 1, 2, 3, ..... 0 if numeric key pressed, send command to Spectruino: \"Set exposure time (N)\" where N is encoded in software\n# in Spectruino, when SetExposureTime(N) is encountered, an interrupt is triggered, and immediately confirmation characters are sent back, even in the middle of data stream transmission.\n# pressing the key \"space\" will display readings of wavelength intensity - see code for more information\n# calibration file is read-in at the beginning, which converts x-axis \"Pixels\" into \"wavelength [nm]\", file must be present in the folder where the executable resides.\n# mouse click on the graph to save a PNG image\n\n== Serial port UART RS232 Communication Protocol description ==\n\n# Plug-in Spectruino into a free USB port\n# open serial port (e.g. COM4 on Windows) with your programming language (we recommend Processing)\n# serial byte array as integer values from 0..255 is sent from Spectruino to PC: [pixel1 value] [pixel2 value] ... [pixel501 value], char(A), char(x), 0x01, 0xF5, char(B), 0x01, 0xF5, char(c), char(y)\n# new measurement on Spectruino takes place, CCD sensor is being exposed to light\n# step 3 is repeated\n# if incoming characters from PC to Spectruino are received, an interrupt is generated\n\n== Setting new exposure time of the CCD sensor in Spectruino ==\n\nFunction setExposureTime(N) is called if you send the following 2 characters over the serial port:\nchar(#) N where N is any hexadecimal byte from 0x01 to 0xFF\n\n== Calibration text ==\n\n# Spectruino v1.0 beta TEST device serial# 013 20120921 a=slope [nm/px], b=intercept [px] y=a*x+b\n\n0.7605552\n374\n\n{{Page data\n| license = CC-BY-SA-3.0\n}}\n\n[[Category:MOST methods]]"}