New to BS2 and needs help ..
al.mana3i
Posts: 7
first of all .. this is the first to program any chip whatsoever .. so everything seems as a puzzle to me [noparse]:([/noparse]
but i hope that i can find what i need here ..
i am using BS2 board which came with "What is a microcontoller" kit .. and i've added the Hitachi compass ..
the code that came with the compass is exactly what i need .. but i need to store the values i get from the compass in a text file or send it to excel .. is that possible ?
if it can be done .. where do i start ?
thank you ..
[noparse]:)[/noparse]
but i hope that i can find what i need here ..
i am using BS2 board which came with "What is a microcontoller" kit .. and i've added the Hitachi compass ..
the code that came with the compass is exactly what i need .. but i need to store the values i get from the compass in a text file or send it to excel .. is that possible ?
if it can be done .. where do i start ?
thank you ..
[noparse]:)[/noparse]
Comments
Since you are new to this, the easiest method would probably use the Datalogger module to write the data to a USB thumbdrive.
http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/datalogger/List/0/SortField/4/ProductID/434/Default.aspx
Welcome to the forums!· If you have done the activities in "What's a Microcontroller?" you are off to a good start. Yes, it is possible to store and export the values you are receiving. I do not have example programs using that particular compass, but there are example programs of data logging and exporting data with other sensors.
www.parallax.com/go/WAM· - Look under "Stamps in Class Mini Projects" and find the·"Data plotting with Excel" pdf download.
Smart Sensors and Applications - This is a sequel to "What's a Microcontroller?" and it has datalogging projects too, but using an accelerometer instead of a compass. The principles will be similar. You can download the book, code, and·Excel spreadsheet·from the bottom of the page.
I hope·gives you some inspiration and examples to start from!
-Stephanie
Post Edited (Steph Lindsay (Parallax)) : 5/25/2010 8:54:04 PM GMT
There is a little free software, that displays the output of a Hitachi HM55B compass, and you can also log all the outputs to file.
The connections are very easy, just connect·the BS2 board to the serial part of the PC, as you can see at the photo·below.
Look at my new post at the Sensors >
http://forums.parallax.com/showthread.php?p=909861
······················To PCs serial part
Download the software at: http://www.mollensoft.com/product3.html
i will try the solutions you all gave me and i'll see what i'll get
but, can it be done with the setup i have already ? and using the USB cable no serial ?
Yes, you can use your USB part·as well. The USB part which·BS2 board is connected, has a virtual Com part, you can easily·find the Com part your BS2 board is connected to. You can do that by connecting the BS2 board to the USB part, start Basic Stamp Editor and·push the
Identify·function or Ctrl+I , a little widow will be·open,·where you could see the·Com part.
At the Debug Terminal at the upper left,·at Com Part·you·could also·see the Com part your BS2 is connected to.
You could also look at Control Panel/System/Hardware/Parts(COM & LPT) here you will see something like this: USB Serial Part(COM5) ,·
Your USB Com Part·may·be some other number. You·have to·use this·Com part number at the·compass software. (The little graphic compass)
Good luck·
@Ron Czapala i did get the DataLogger .. my question is how to get the feed from the Compass to be written in the Flash memory ?
thank you for your help ..
DEBUG "DATA,", DEC Val1, ",", DEC Val2, CR
If you haven't done so already, you should read the help file that comes with the PLX_DAQ download.
DEBUG CR
and i think this is what i need, but when i start PLX_DAQ i'm getting
Error: Data < ASCII 10 or ASCII 200
what does that means ?
But if you want your data to appear in Excel you need to add a valid DATA command (like the one I posted) to your program so that the data are sent to Excel and recognized as data by the macros in Excel that make up PLX_DAQ. Here's an example that I'm using:
SEROUT 16, 396, [noparse][[/noparse]"DATA, TIME, TIMER,", DEC5 alt, CR]····
This command sends the current time and current timer reading to two columns in Excel, and then the value of my "alt" variable to the third column. The "DATA" at the start tells the Excel macro to interpret the next things (everything up to the CR) as data to be displayed (TIME and TIMER are special data functions included in PLX_DAQ).
A more simple example would be
SEROUT 16, 396, [noparse][[/noparse]"DATA", DEC5 alt, CR]····
Which would simply put the values of my "alt" variable into the first column of the active Excel spreadsheet. You need something of this sort in your code.
Thank you for your great help, i really appreciate your help.
i'm frustrated with this code thing, i'm using HM55B Demo Software.bs2 that came with the compass, what modifications should i do to the code in order to get the Excel and PLX_DAQ work?
what should i do ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
and i've figured it out [noparse]:)[/noparse]
i don't know how .. but i did it