Category Archives: Feldman Project

Tom DeVito 11.29.11

Start: 10:00

  • Finished the testing sandbox for datadictionary.  Its strange, it uploads with some errors about the class object not being there, it doesn’t crash during runtime, but still doesn’t work.  It is actually using the class which is having the error to send the serial data back.
  • Still trying to figure this out.  I have decided its not necessary on the arduino side.  The DataDictionary will still work in the main sketch so the transfer from the PC side will work fine it just won’t be able to be used in the other classes which don’t really need it considering there is no graphical interface or anything else to interact with on this side.
  • Rewrote the ComUtil class to work without the DataDictionary.

End: 6:00

Thomas DeVito 11.28.2011

Start: 9:45

  • Upon clicking the compiler error, I found that for some reason it was using a different DataDictionary then the one seen in the project folder.  I was able to make the changes and compile.
  • For some reason Visual Micro is not able to make the objects properly when trying to deploy.
  • Something went very wrong with Visual Micro,  none of my sketches will compile now.
  • Reinstalled Visual Micro which was actually kinda annoying.  Not only did you have to delete it but you also had to go in the setting and disable the mod that did shouldn’t be installed.
  • Visual Micro is now able to compile working sketches again
  • The DataDictionary is still making a weird error message.  I commented out all the instance of it and found that there are no errors if it is only declared in the main sketch.
  • Uncommeted the datadictionary in ComUtilB,  I still get a weird error message but the sketch seems to be sent.
  • Setting up a sandbox to test datadictionary from a class.  All previous tests were done in the main sketch.  I have a feeling it will work but I will still get the weird compiling messages.

End: 5:45

Tom DeVito 11.23.2011

Start: 9:45

  • For some reason, the ComUtil class would not include properly.  Renamed it ComUtilB and it works again.  No idea why I had to do this but it will help keep the arduino and pc versions from getting confused.
  • The Singleton method of the DataDictionary is not working on the arduino side.
  • Fixed a few things which were causing compiler errors, still can’t figure out why the singleton method isn’t working
  • Checked to see if I was having the same problem on the PC side.  It seems to be working fine.
  • Googled “singleton arduino,” apparently it can’t be done in the standard way because the arduino is single threaded.  There is a solution which I have yet to try in the second to last post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1295472760

End: 5:45

Tom DeVito 11.22.2011

Start: 11:00

  • The link I posted yesterday for using visual studio with the arduino only works with VS2008.  There is a new link which was added to the bottom for a addin called Visual Micro:  http://www.visualmicro.com/
  • I was having a problem creating a arduino project.  I had to reset the addins: http://www.visualmicro.com/post/2011/10/01/How-to-reset-the-arduino-visual-studio-interface.aspx
  • Imported all the arduino classes into the project.  I used the testing sketch to check and make sure it uploaded to the arduino, everything seems to be working.  There are some red underlines here and there for no apparent reason but it compiles and transmits correctly.
  • Everything is in one place now.  Its much easier to see and edit all the classes from one place.  Before I could only really see the main sketch and had multiple windows open for the classes.
  • There are a couple bugs in the error checking.  The IDE will red line some things which are actually not errors and compile fine.  Still a vast improvement.
  • The ComUtil class on the arduino side was not being included properly.  Not exactly sure what I did but it is working now.
  • Everything seems to be working properly in individual testing now.  Putting it all together, hopefully will have something to show by end of the day tomorrow.

End: 6:00

Tom DeVito 11.21.2011

Start: 9:45

  • Added more commands to the command handler.  Now all fingers should be able to change notes on command.
  • The interface now will display the first value but won’t update.  The com led is not lighting up on the arduino, so it might be crashing.
  • Trying to track down a bug that is causing the Arduino sketch to crash.
  • Found a way to use Visual Studio with the arduino:  http://www.arduino.cc/playground/Code/VisualStudio

End 5:45

Tom DeVito 11.18.2011

Start: 9:45

  • Found the problem with the command data structure nto passing right.  I forgot that if you use a char before an int you have to pad the data with another char.
  • Communication is now work in the new set up.
  • Having trouble getting the console to write the values.
  • Found the pointers that hold the values.  Added data dictionary entries for them.
  • Values are still not setting right.

End: 5:45

Tom DeVito 11.17.2011

Start: 9:45

  • Finished the arduino executive
  • Finished editing the arduino version of comutil class
  • Everything is in the right place now but it still needs some debugging.   With luck I’ll have it working by tomorrow, if not Monday.

End: 5:45

Tom 11.15.2011

Start: 9:45

  • Finished the executive class
  • Fixed a problem with the Data Dictionary singleton method
  • Everything should be working on the pc side.  I am going to check what is wrong with the midi controllers tomorrow and work on the arduino side

End: 5:45

Tom DeVito 11.14.2011

Start: 9:30

  • Forgot to add the instance the data dictionary in the comutil and the interface classes.
  • Added a method for clearing the buffer so the end will always be null.
  • loadBuffer put data elements into the the send buffer.  Because of the way windows handles incoming communication, the buffer has to be hard coded.  Currently the buffer limit is 256 bits.
  • Strangely the midi controllers are not initializing the notes properly.  There is nothing obviously wrong with the wiring.  The amplifiers are changing volume but no tone is being produced.
  • The Ring finger started working not sure why.
  • Tried adding delays in the initialization loop.  This had no results.

End: 5:30

Tom DeVito 11.11.2011

Start: 9:30

  • Working through the programing with FLUID tutorial.  This is the one with the cube view opengl class.
  • The tutorial explains a couple things I was confused about besides integrating opengl.  There are sections for menu items as well.
  • The openGl class should inherit from Fl_Gl_Window.
  • This example uses a callback function to pan and redraw the cube, whenever the slider is moved.  This eliminated the need for something like a glutMainLoop() and can be used similarly with a timer function instead of a callback.
  • This example shows how to use a timer function for opengl animation within a fltk interface: http://www.dreamincode.net/forums/topic/124557-c-3d-animation-fltk-opengl-tutorial/
  • Here is a tutorial for animated line drawing: http://seriss.com/people/erco/fltk/#AnimateDrawing
  • I’m not sure if it really needs to be animated for what I want to accomplish.  I really just want to be able to graph the sound to pressure ratio so we can visually see the if a linear relationship is better then some other form in feedback.  It might make sense to not have the box there and just have the data output to spreadsheet or something.
  • Working out a couple bugs from moving stuff around.  I am getting better at not making spaghetti code so I shouldn’t need to back track as much as I have been in the future.  Most of this backtracking is because I took shortcuts which now I know were not very time effective in the long run.

End: 1:30

Thomas DeVito 11.10.2011

Start: 9:30

  • Was able to resolve the linker error that was making it so glutMainLoop() was not defined.  In order to use glut with fltk, you need to include the FLTK versions of glut.h and glu.h as well as link the following libs: opengl32.lib, flu32.lib, and fltkgld.lib
  • I moved all the hardware loop functions into an executive class which is going to be run by a timer function.  Simplified the code and delete obsolete code.
  • Phil suggested to use fltks timer functions instead of a glut loop as well as check to see if there a line graph in FLTK so I don’t have to use gl for them.
  • Tutorial for fltk and opengl:  http://www.fltk.org/doc-2.0/html/fluid.html

end: 5:30

Tom DeVito 11.09.2011

start: 9:00

  • When I was looking at the code for the interface, I found that fltk names things without names o by default.  This was very confusing so I went back and renamed everything including the stuff which will never change.
  • Had a runtime error once I got the code into the constructor of the interface class.  After lots of debugging I found the source to be 2 extra empty menu items. Removing these seemed to solve the problem but 30 minutes later, for no apparent reason, I started getting the same error.  I removed the menu bar completely for the time being.  It will be added when I want the save and load settings functions to work.
  • FLTK has a glut-like loop.  For whatever reason I thought I was going to be able to easily run my loop with it.  I can set up a timer function but much of what I am seeing about how to do this is vague.
  • While looking around for how to make a timer function, I found an example that uses glutMainLoop() instead of Fl::run().  Considering I already know how to use a glut timer function and eventually I am going to need this interface to use gl simulations, I figured this was a better approach to the problem.
  • When I tried to run it off a glutMainLoop, I had many compiling errors most likely because I didn’t initialize the gl functions yet.
  • Sent e-mail to myself to remind me to figure out what hardware is needed for three sets of strain gauges.  I think we just need two amplifiers but I’ll double check tomorrow.

end: 5:00

Tom DeVito 11.08.2011

Start: 9:15

  • Added commands for enabling and disabling fingers
  • Included comutil class to the arduino sketch and removed the temporary com methods.
  • Sent some data back and forth to make sure the class was still working.
  • Added a method to monitor the user interface for new values to trigger commands.
  • The commands don’t seem to be importing correctly 100% of the time.  I hope to resolve this tomorrow.

End: 5:15

Tom DeVito 11.07.2011

Start: 9:30

  • Made an arduino version of my ComUtil class.  As with the PC version, this class links the gap between the com manager and the data dictionary.
  • Added a method for command handling on the Arduino.
  • Tested sending the change thumb note to command.  The variable changed properly.
  • Added commands for the other fingers.
  • Added commands for changing instruments.

End: 5:30