Uhh I've been doing a lot of blogging and neglecting my other work, so here is minimalist style ftw.
nyancake? nyangummi? |
apply release agent, aka cooking spray / pam -- otherwise doesn't come out well. also, sprite+cakemix mixture should not be too gloopy. add flour if accidentally pour too much sprite. |
many fail results. Here, did not let bake long enough. (much longer than box says -- I baked a bit lower temp based on silicone mold research, ~325deg C, and for say 1 or 2 hours) |
demolded too quickly, also did not cover in saran wrap to retain moisture afterward |
nyancake party~! nyan nyan nyan |
probably the best of all my nyancakes. you can see that the minimum mold feature size -- the sprinkles -- were too small for the resolution of the cake mix and actually resulted in holes. |
speed cooling jello in freezer. recipe used: the lego gummies from instructables |
Persistence of Vision Yoyo
I also figured out the issue with the MAS.863 makefiles causing my weird "compiler" bug (actually, compiler options / makefile bug):
Class-based makefile includes:
avr-objcopy -j .text -O ihex ./v0.1.45.out ./v0.1.45.c.hex
man avr-objcopy
-j sectionname
--only-section=sectionname
Copy only the named section from the input file to the output file.
This option may be given more than once. Note that using this
option inappropriately may make the output file unusable. >__> <__<
So the class makefiles should be fixed to include "-j .data"The internet says
"The makefile above DOES NOT create a proper HEX image and is a bad example. When creating an image, not only does the text section (which holds the code) need to be included but the data section (which holds any initialized data) also needs to be included.
The remedy for this is correct .hex rule to to copy the data setion as well
Example:
$(OBJCOPY) -j .text -j .data -O ihex $(PROJECT).out $(PROJECT).hex
" http://www.micahcarrick.com/avr-tutorial-digital-output.html
So the actual model of what was causing my bug was, I believe, without calling another function the compiler goes ahead and uses the array to insert the correct commands into the compiled code. But when I used a subfunction, the compiler loads the subfunction which the microcontroller calls, but the ucontroller does not have the array data to look up what to set DDRB and PORTB to.bmayton: that actually explains a lot of odd bugs that I've been seeing with peopleusing constant arrays, since the array data is never getting copied into the
program
Anyway, then I proceeded to hack together terrible!code and get PoV working. I used oloepede's sample image 'cos I'm all about the laziest and quickest tests and 'cos olopede is awesome.
eheh derp ripped off ISP traces / headers |
works fine waving it by hand (without camera extended exposure time, hard to see entire "olopede" message -- can see maybe three letters at a time. dead reckoning PoV timing -- no sensors.) |
See https://picasaweb.google.com/113942194695013581888/PoVYoyoPersistenceOfVision#5681157335962400194 for video
See video:
https://picasaweb.google.com/113942194695013581888/PoVYoyoPersistenceOfVision#5681157457783660930
Vending machine
Right, essentially two weeks until final projects due. Aka time to start cramming on vending machine.
What do I have on hand? Arduino uno, extra servos leftover from when I bought out all the old 2.007 servos., zipties, handheld drill, a corkscrew. Found some rectangular metal thing to act as guiderails lying around MITERS scrap pile. Also found a block of wood lying around the floor.
Mod a servo to be
continuous rotation servo
(essentially turn it into a cheap RC motor that comes with motor speed controller in a convenient package for mounting) --
aka remove mechanical stop on gear
apply flush cutters to stop on gear |
stick pot on outside, chew a hole for it in the casing -- i abused flush cutters |
springs / coils
Attach to corkscrew (from real vending machine) I bought off of ebay to see what real mass manufactured ones are like so I can make fake ones DIY like http://www.instructables.com/id/Make-your-own-springs-in-seconds/
Drill out servo horns (1/8'' bit fits zipties I found) and attach to corkscrew with zipties
it vends a block! haha. terrible setup is terrible. |
https://picasaweb.google.com/113942194695013581888/VendingMachineOpenHardware#5681154916854562050
Yea, not a very interesting proof-of-concept (a "duh are you an idiot" one), but it was very satisfying to me.
Oh right, I tried to use hot glue to hold the pot in one place, since that affects how the servo reacts to servo.write() (pot adjusts when it goes fwd/reverse) -- I just used
myServo.write(50) with a 0.5 sec delay
myServo.write(90) with a 3 sec delay
myServo.write(130) with a 0.5 sec delay
to calibrate the pot so that servo was completely still at 90. And then attempted to hot glue. a bit flaky-- not good enough for long-term banging around but good enough for dirty proto.
No comments:
Post a Comment