Gas station without pumps

2017 November 15

Events and Services Framework ported

Filed under: Robotics — gasstationwithoutpumps @ 23:11
Tags: ,

I’ve ported the Events and Services Framework from Mechatronics to the Teensyduino environment.  I copied (with slight modifications) the code that I wrote for Lab 0 (the roach lab) to debounce buttons and detect changes in light level, and it worked fine.  It took me a little while to convince myself that everything was working, because the light I’m working by is a somewhat dim LED bulb, and I was seeing very little change in the phototransistor output when I put my hand over the sensor.  I had to hook up my oscilloscope to convince myself that the values I was seeing were correct—there was little change because the phototransistor was not very sensitive to the light I was working with.

I also ended up throwing away some of the precision of the analog-to-digital converter so that the filter constants would work out to avoid overflow.  Since I won’t actually be using these filters in the final robot (I’ll be doing synchronous detection for the tape sensors, not filters that adapt to background light), I won’t have the same problems in the robot.

So I’m now ready to start writing my software, but that will have to wait until after class tomorrow, as I have some sleep to catch up on.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: