Category Archives: Feldman Project

Phil 12.20.12

8:00 – FP

  • Installing arduino drivers and generally setting up environment.Done
  • Working on understanding ASCII serial communications
  • Serial echo:
    const unsigned int BAUD_RATE = 9600;
    
    void setup(){
      Serial.begin(BAUD_RATE);
    }
    
    void loop(){
      int numChars = Serial.available();
      if(numChars > 0){
        Serial.print("numChars = [");
        Serial.print(numChars);
        Serial.print("] string = ");
        for(int i = 0; i < numChars; ++i){
          // Serial.read returns the first byte (int?) of incoming serial data
          // available (or -1 if no data is available) - int
          char inp = Serial.read();
          Serial.print(inp);
        }
        Serial.println();
        Serial.println("ready");
      }
    }
  • Turns out that I don’t have Visual Studio here. Talking from C++ will have to wait until this afternoon.
  • The arduino book references arduino-serial.c for example c code. The book’s code is here.

Tom DeVito 4.19.2012

Start: 9:00

  • After lots and lots of headaches I have finally got it to do an echo test.
  • The data corrupts over time because there is too many parts of the code that can trigger a sendmessage()
  • I need to make it so only one part of the code sends a message and that only one message can be sent per pass
  • I need to optimize the state machine and simplify it.
  • Need to get this done so I can focus on the hardware next week.  I will be in on the weekend if I need to.

End: 6:00

Tom DeVito 4.18.2012

Start: 9:00

  • Worked on figuring out what was wrong with the code which allows more than one packet to be send.
  • Fixed calculations for number of packets and for figuring out buffer position when loading the buffers
  • uint8_t has a weird definition in the avr world.  I changed all instances to unsigned char to ensure this didn’t cause any problems for me.  uint16_t is still required
  • Started using the addon I recommended in the previous post.  It pretty much automates everything that is really annoying.
  • Fixed lo0ts of minor bugs and things that could potentially cause major problems but Still can not get the arduino to receive properly

End: 10:00

Phil 4.19.12

8:00 – FP

Tom DeVito 4.17.2012

Start:  11:00pm

  • Found the main problem with the comutil.  Apparently I started implementing the large data transfer but did not finish so it was bugging out.
  • For whatever reason, casting the return of ceil(float), wouldn’t work the way I am used to (int)ceil(float).  Instead I had to use int(ceil(float)).
  • Fixed the problem with calculating packets of data in the send buffer and the packets sent counter.
  • The reason I needed to move the message from the end of the data transefer to the beginning is the number of packets was getting corrupted and returning 255.  This meant that every send tried to send 255 packets.  Single transfers were working fine but multiple pass echo testing was broken.
  • Still having a problem with echoing back from the arduino.  I also need to test multiple packet data to make sure that it is actually working as intended.
  • Changed the name of the library from ComConsoleLib.lib to DataCommunication.lib
  • The ComMonitor class is now just called Monitor
  • _isLocal and related methods and variables are now called isShared.  This signifies data that will cross the wire.  The criteria to send something across is that it must be initialized as isShared and be dirty.  An object becomes dirty when you use the setData method of the DataElement.  Although its not the most memory efficient way to do things, using container variables in your class and then sync them with their datadictionary entries at the end of the classes cycle, may be the best way to ensure the datadictionary is aware of the change without having to use the dataelements set command throughout your whole class.
  • http://www.wholetomato.com/default.asp —- This is a add-on for Visual Studio.  It has a lot of good reviews from c++ developers as it adds a lot of the convience of the .net/java ide.  It is not free but their is a trial so I will see if its worth the money.  It is $250 for the professional license or $100 for the personal license.

End: 7:00am

Phil 4.17.12

8:00 – 4:00 FP

  • Moved the texture file name for TexturedCollisionCube to the constructor. I’m going to have multiple cubes to interact with, and need to be able to show different “surfaces’. I need a ‘soft’ looking texture.
  • Found some soft looking textures. Next, I need to have some way of determining what the properties of each type of collision are.
  • Adding CollisionTone class. Nah, I need to integrate that into the FingerIO class. We’ll do that tomorrow. I also want to add some kind of state output. Maybe use the soundText field?

Tom DeVito 4.16.2012

Start: 10:15

  • Still haven’t figured out why the arduino is having trouble receiving.
  • Tested the method independently which recieves data and it seems to work as intended
  • Copied all except the constructor from the PC version as this side is working properly
  • A test of the Serial.available() method showed that it returns proper values but still stops at 127
  • Tried reducing the packet size to 64 bytes.
  • Its still getting stuck on receiving.  If it got to processing it would send and update to the PC
  • PC side seems to have no problem sending or receiving.
  • I did a pass on Wednesday which worked.  I don’t recall changing anything since then.
  • Fixed a problem that sometimes the Arduino would initialize in a invalid state.

End: 6:15

Start: 8:00

  • I didn’t spend too much time on it but I was able to get the arduino to receive properly.  For whatever reason I had to put the message before the data.  I am not sure why considering it worked fine the other way but at least its working.
  • There are still a few things I need to do, I was not expecting to have to spend so much time solving this.  The main thing is packaging it with the DataDictionary so you can use it easily without tons of code.
  • The way it will work is you create the entries using the subscribe or publish methods, while doing this you determine if it is local. The easiest way I found to keep the datadictionary synced without having to use the set commands all the time, is to have a sync method in the post process which will set the variables to whatever their local container values are.  Anything not owned by the class can be accessed directly through the dictionary, setting is only more complicated because we want to track if they change or not.  Everything that is dirty and remote gets sent across the wire.  Remote might not be the best word for this, so I am going to change the parameter to isShared.

End: 9:00

Phil 4.16.12

8:00 – 4:00 FP

  • Dealing with a few left over paper issues. Then on to integrating the code? Otherwise, I’ll work on getting TexturedCollisionCube working and handling rotations.
  • Textures work. Checking through rotations. Fixed! It turns out that I was multiplying the model matrix and the collision matrix in the wrong order. Took a while to find, but it seems to be working nicely now.

Tom 4.13.2012

Start: 10:00

  • Sensors circuits work
  • The heat sink of the voltage regulator burned my finger.  It has an overheat cut-off so it shouldn’t damage anything if it gets to hot.  That said its best to give it more surface to dissipate the heat to.  Its designed to be bolted to the board, maybe that is enough.
  • p(watts) = dv * i (power dissipation of a voltage regulator)
  • Its possible the current is higher then when I tested it.   Not sure why that would be.
  • Need to find slightly thinner bolts.
  • In retrospect I should have used the dead zone on the board for the i2c bus.  Only one per 8 Fingers is necessary.  There is still room to drill holes and mount it on one of them.
  • Started assembling the bus

End: 6:00

Phil 4.13.12

8:30 – 2:30 FP

  • Getting re-acquainted with the rendering code
  • Fixed my base class problem with calling setup in the derived class. Still not sure why I can’t call the subclass from the superclass in C++.
  • Paper is done and submitted!

Tom 4.12.2012

Start: 10:30

  • Built one of the boards.
  • Tested the voltage levels.  The branches output 12v and 5volt respectively.
  • Setup a sketch to test the boards
  • Tested leads to figure out which sensor and speaker they are for.  They are sorted left to right.

end: 6:30

Tom DeVito 4.11.2012

Start: 12:30

  • Removed test classes
  • Simplified initialization and use of classes by taking out parameters which were not needed in the final version
  • Started writing sketch to communicate with computer simulation
  • Might have counted my chickens too soon.  I forgot that I undated the Arduino software.
  • The error I was working around that only allowed 127 bytes to be sent seems to have been fixed.  It is causing problems with the messaging.

End: 5:30

Start 7:00

  • Fixed all the methods to use 128 bytes again.  Messaging is working but data transfer is still messed up.
  • Added back in code for data transfer testing.  Data transfers fine, the buffer doesn’t seem to be loading properly when it gets data from the data dictionary.
  • Solved the issue with the buffer loading but now it continues to try to send when no data is present.
  • Probably need about an hour to finish working out the bugs.  I will have this up as soon as possible.  The rest of the sketch will probably take a little longer.  I thought I was going to be working on that now instead of troubleshooting the data classes.  Hopefully still by midday as it is mostly done.

end: 11:00

Thomas DeVito 4.9.2012

Start: 10:00

  • Cleaned up data dictionary classes
  • Cleaned up Controller base class
  • Cleaned up Amp and Midi classes
  • Cleaned up Com classes

End 5:00

Start: 7:00

  • Finished Audio Controller
  • Cleaned up Command response and state classes
  • Everything should be good, just need to do some testing and troubleshooting as I left the extra arduino in the office.

End: 9:30

Phil 4.9.12

7:30 – 1:30 FP

  • Seminar. Discovered I can resubmit the CHI paper to UIST. Started working on that.
  • Ordering parts for the boards, which came in Friday

1:30 – 4:30 CSIP

  • Continuing to Hibernate
  • Chapter 8
  • Chapter 9, with a short trip to chapter 11. I finally found out how to install Hibernate Tools without crashing and burning. Go here, and drag the link to somewhere on your eclipse workspace that doesn’t have text entry (it’s an URL), like the border. Presto! Magically installing plugins.
  • For reference, because I think this may be the way this effort finally goes. And hey, I always wanted to write code that generated bytecode…
    • ASM is an all purpose Java bytecode manipulation and analysis framework. It can be used to modify existing classes or dynamically generate classes, directly in binary form. Provided common transformations and analysis algorithms allow to easily assemble custom complex transformations and code analysis tools.
    • ASM offers similar functionality as other bytecode frameworks, but it is focused on simplicity of use and performance. Because it was designed and implemented to be as small and as fast as possible, it makes it very attractive for using in dynamic systems.