Category Archives: Phil

Phil 5.16.12

8:00 – 4:30 FP

  • The communications test ran all night and was still working and responsive when I came in. Time to make some sounds!
  • Fixing up the messages, and eliminating redundant/unneeded info in the Json packet – all done, and the data transfer seems much happier
  • Added clamping to keep volume and pitch from getting out of hand.
  • Moving the hardware initialization from SoundDataObject to SoundController. I think I’ll also explicitly set up the sound objects, at least for now.

Phil 5.15.12

8:00 – 4:30 FP

  • Working on the SoundController class. Going to try out the basic mechanisms in the sandbox before trying them on the arduino.
  • Got the JSON key/value search working. Now I need to organize all the unique sound objects.
  • SoundController class is working in the sandbox
  • Meeting over at UMBC to go over SIGCHI
  • Have SoundController on the arduino and am currently testing.  If all fingers are updating data, the communication gets bandwidth limited. This is ok to work out the sounds, particularly on a finger-by-finger basis, but it will need to be optimized to keep the refresh rate up.

Phil 5.14.12

8:00 – 4:00 FP

  • It’s Bike To Work Week. I’ll need to ride in one day when it’s not raining.
  • Continuing to add SoundWrapper to FingerIO
  • Hmm. The SoundWrappers think that there is always a new sound. Ok, fixed.
  • Decoupled the reads and writes, putting everything on timers.
  • Since I now have 15 unique JSON messages specifying sound per finger, I’m setting up the Sound handling on the arduino side to maintain and assign the data.

Phil 5.11.12

8:00 – 2:30 FP

  • Working on finger sound management
  • Building the Hysterisis class – done
  • Building sound class: volume, id, sound state, ..?
  • Adding SoundWrapper into FingerIO

Phil 5.10.12

8:00 – 2:00 FP

  • Came in this morning to happily running communication 🙂
  • Sound design
    • Finger moving forward
    • Finger moving backwards
    • initial contact
    • sustained contact
    • release
    • Hysterisis box or something similar to slow down the amount of calls to the sound class
    • I think I need individual messages for each finger
      • {“nm”:f1, “cmd”:start, “srl”:2, “nt”:3, “vol”:0.7, “chnl”:4} // normal command
      • {“nm”:none} // nothing new, keep on doing the same thing for all fingers
  • Restructuring FingerIO to contain the logic for producing the above JSON strings

2:00 – 4:30 ESSO

  • VISIBILITY meeting

Phil 5.9.12

8:00 – 5:00 FP

  • The wired network was down since yesterday around 3:30. Bounced everything which didn’t seem to work, but everything came back up in 20 minutes.
  • Moving my DataElement/BaseDataObject classes back over to the Arduino for evaluation and testing.
  • Grr. Memory leaks. Because I’m using strcat, I needed to ensure that the buffer[0] was set to NULL before starting.
  • Looks like that did it. Need to test in the sim, and then it’s time to add the sound in!
  • Sound is working. The system freezes after a few minutes’ use. I’m testing the communication in the sim alone now and it doesn’t seem to be breaking. I’ll run an overnight test.

Phil 5.8.12

8:00 – 4:00 FP

Phil 5.7.12

8:00 – 4:30 FP

  • The kinetic sculpture race was a blast. Here are pix: http://www.flickr.com/photos/21701734@N04/sets/72157629972340647/
  • Let’s see if we can get sound working today!
  • And now a short pause while we install video driver updates…
  • Looking through the port_test code
  • Having problems with the serial code again. It appears that the arduino is getting into a condition where it thinks that there is always a character waiting to be sent
  • I’ve gone back to the test harness, which is having the same problems. It appears that there is something wrong with the workingBuf[]. If I don’t put characters into it, then the rest of the code works fine. Nope, it seems fine. Moving onto the aJSON and DataObject classes.
  • aJsonObject* jsonObject = aJson.parse(workingBuf); and aJson.deleteItem(jsonObject); seem to reliably crash things. I think it’s a memory leak. That would explain the randomness of the errors.
  • Putting a parser in the BaseDataObject class. Going to see if I can use this hashmap: http://www.arduino.cc/playground/Code/HashMap
  • I really can’t believe I’m hand-rolling a parser. Ah, well. Onward.
  • Built a DataElement class (with static declarations!) Handles char[16], int and float. Mostly done. Integrate with HashMap and test tomorrow.

Phil 5.4.12

8:00 – 4:00 FP

  • May the 4th be with you!
  • PAD lab – spent some time going over the serial library
  • Hooked up Tom’s full rig to the sim. The sensors work, and the sound works using his sketch. He’s going to comment his code and I’ll start to integrate sound on Monday.
  • Bent the fingers on the hand to be a bit more ergonomic

Phil 5.3.12

8:00 – 9:30 ESSO

  • Added my presence to the search for solutions.

9:30 – 4:30 FP

  • Integrate pressures today
  • Run sound from the PC until the Arduino is working? Synth shield (http://shop.moderndevice.com/products/fluxamasynth)
  • The sim is now sending sound ID and volume to the Arduino, and getting pressures!
  • Measuring presures from the force sensors.
  • The board seems to get stuck in the WAITING state occasionally. Added a RESET if there is no character read for 1/2 second.

Phil 5.2.12

8:00 – 4:30 FP

  • And somehow, here we are back at communication libraries. At least I have an existence proof that it *can* work. The serial console is perfectly happy. Which means the Arduino code is happy. It looks like I get to blame Windows.
  • Serial looks more solid today. Need to integrate the classes so that ArduinoSerial does a straight passthrough to SerialPort
  • Code is fixed and in Subversion. Back to Monday’s task of integrating with the sim.
  • Building the outgoing JSON object. It turns out that trying to set an int value using cJSON->valueint doesn’t work. Use cJSON->valuedouble. If it’s an int, the printing will be correct.
    • SoundObject is up and running
    • PressureObject is created and waiting to be populated.
    • Tom is building a connector so that I can interact with the pressure sensors tomorrow.

Phil 5.1.12

8:00 – 5:00 FP

  • Generalize JSON parsing in the sketch
  • Integrate serial communication into the demo. Fail gracefully into a GUI-only system
    • Add sound?
    • Adding DataObjects for sound type & volume (inputs) and pressure (outputs). Done
    • And now the serial code is choking again. It seems to be related to the size of the stream that’s sent up. Looking at that after lunch. First test will be to read on the pc without writing, while having the arduino write at faster and faster rates.
    • I got things to work better, but not as well as the serial console. Found a serial library on google code (http://code.google.com/p/mbsutil/). Going to try to use a few pieces from that ad see if it will work better. Got it to compile. Tomorrow, I’ll try to integrate it…

Phil 4.30.12

8:00 – 4:30 FP

  • Seminar. Last one for the year!
  • SF86 follow up
  • Updated resume
  • Talked to Tom a bit about his preamp problems, and worked out a way to proceed.
  • Looked at the Arduino, but did nothing with it. Back to a normal schedule tomorrow.

Phil 4.28.12

1:00pm – 5:00 FP

  • Brought in some more tools
  • Seeing whether Tom and I can integrate the hardware for the show. Nope – feedback issues in the audio
  • The burn test ran fine for approximately 20 hours at 19.2 kbaud. I’m going to work on creating a separate library and then integrate into the KF hand code.
  • built separate library. Realized that I need to put in the JSON reading code on the PC side. Done.
  • Added string assembly code to arduino JSON library and tested
  • Committed all to Subversion

Phil 4.26.12

9:30 – 4:30 FP

  • Slept as much as possible, hoping to become unsick. I think I feel better today
  • It looks like the serial code is working much better. I was trying to determine the size of character buffer using strlen(). Without a null-terminated string to measure, that just won’t work. Thanks to Tom for pointing this out.
  • Getting the json strings to play nicely with the ajson parser. looks like *no* spaces allowed outside of quotes. This is allowed:
    • {"f1_vol":0.10000,"f2_vol":0.20000,"f3_vol":0.30000,"f4_vol":0.40000,"f5_vol":0.50000,"f1_snd":1,"f2_snd":2,"f3_snd":3,"f4_snd":4,"f5_snd":5},
  • while this is not:
    • { "f1_vol":0.1, "f2_vol":0.2, "f3_vol":0.3, "f4_vol":0.4, "f5_vol":0.5, "f1_snd":1, "f2_snd":2, "f3_snd":3, "f4_snd":4, "f5_snd":5 }
  • Sending and receiving the appropriate json objects. Now let’s try to update and resend. Done and working. A pretty good day.