tag:blogger.com,1999:blog-5009749739032040342.post6790801948231108634..comments2023-05-05T07:15:32.089-04:00Comments on Medic for Life: Integrating the TMP102 sensor with the datalogger, and I2C bus lengthsStatichttp://www.blogger.com/profile/10366235037249278451noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-5009749739032040342.post-81510839179946554232013-05-02T20:33:52.742-04:002013-05-02T20:33:52.742-04:00Thanks again. Yes, I had seen this. Right now, I&...Thanks again. Yes, I had seen this. Right now, I'm trying to master RPi, Linux, and Python, and complete the device I'm working on. I had hoped to put off learning how to compile C progams, and studying the the TSL2561 datasheets, but it looks like there is no plug-and-play option, so I'll plunge in.Tom Coxhttps://www.blogger.com/profile/08477290485769745881noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-30987183657907829082013-05-02T17:17:06.654-04:002013-05-02T17:17:06.654-04:00Oh, no. Not my post. The post by catmaker on Dec...Oh, no. Not my post. The post by catmaker on Dec 8th.<br /><br />I think the thread may be able to help. I looked at:<br />http://www.spinics.net/lists/linux-i2c/msg08427.html<br />and was dismayed to see that you had already seen that thread. Statichttps://www.blogger.com/profile/10366235037249278451noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-67852283526318503002013-05-02T16:57:45.914-04:002013-05-02T16:57:45.914-04:00I find no post by you an the page at that URL. I find no post by you an the page at that URL. Tom Coxhttps://www.blogger.com/profile/08477290485769745881noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-56577209064411557672013-05-02T15:50:12.280-04:002013-05-02T15:50:12.280-04:00http://www.raspberrypi.org/phpBB3/viewtopic.php?p=...http://www.raspberrypi.org/phpBB3/viewtopic.php?p=229682#p229682<br />Try this forum post, on this page.<br /><br />http://www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=22348&p=245909&hilit=Python3+I2C#p245909<br /><br />That may be what I used. There was a period where I was pretty sleep deprived, and my notes aren't of much help.<br />Let me know. If it doesn't work, I'll keep looking and chasing things down.Statichttps://www.blogger.com/profile/10366235037249278451noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-17658861000065391382013-04-30T18:38:10.425-04:002013-04-30T18:38:10.425-04:00The code (which is yours) is here: http://forums.a...The code (which is yours) is here: http://forums.adafruit.com/viewtopic.php?f=8&t=34922&p=179703#p180768<br /><br />Your posting is dated Jan 30, 2013 1:20 pm<br /><br />The line "import smbus" causes Python 3 to complain, "No such module."Tom Coxhttps://www.blogger.com/profile/08477290485769745881noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-77025968643963285002013-04-30T04:15:46.348-04:002013-04-30T04:15:46.348-04:00Tom, are you using a "sh-bang" at the to...Tom, are you using a "sh-bang" at the top of your code? <br />The: <br />#!/usr/bin/python<br /><br />I'm not 100% sure what this does, but I remember reading that it is important. I think it "points" Python to the correct directory.<br /><br />Any chance you can post your code, and I can try it on my machine?Statichttps://www.blogger.com/profile/10366235037249278451noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-6332030371632851682013-04-29T22:11:19.135-04:002013-04-29T22:11:19.135-04:00I'm at work right now, but I'm going to ta...I'm at work right now, but I'm going to take a glance at this in the morning, and pack my laptop to take with me tomorrow. I feel like I ran into this problem, but I can't remember how I fixed it. I'm going to read over my notes and possibly ask for help on one of the boards. Statichttps://www.blogger.com/profile/10366235037249278451noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-89569034688390102612013-04-29T21:08:12.199-04:002013-04-29T21:08:12.199-04:00sudo apt-cache search smbus produces one result: p...sudo apt-cache search smbus produces one result: python-smbus.<br /><br />sudo apt-get install smbus produces "Unable to locate package smbus."<br /><br />sudo apt-get install python-smbus indicates that it is already present, probably from my previous fumbling.<br /><br />Your code says "import smbus." IDLE 3 (Python 3) reports "No such module." IDLE (Python 2) finds smbus, but complains two lines later that it can't find and import the module Adafruit_I2C.<br /><br />I think that is because I don't know where to put that module, and have put it in the wrong place, where Python can't find it.Tom Coxhttps://www.blogger.com/profile/08477290485769745881noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-85781435634668851902013-04-28T01:16:21.281-04:002013-04-28T01:16:21.281-04:00Terribly sorry that I didn't get back sooner. ...Terribly sorry that I didn't get back sooner. I don't think that I'm using a different version of smbus. I capitalized it out of habit, not because it is different.<br /><br />I'm trying to think of what I did differently. Did you update your Raspberry Pi installation?<br /><br />Did you update the smbus installation? <br />(sudo apt-cache search smbus)<br />then<br />(sudo apt-get install smbus)<br /><br />Those are the only ones I can think of off the top of my head. Let me know if they work. I'll keep looking.Statichttps://www.blogger.com/profile/10366235037249278451noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-29257048683946540252013-04-25T20:18:32.989-04:002013-04-25T20:18:32.989-04:00I'm trying to use theTSL2561 Luminosity Sensor...I'm trying to use theTSL2561 Luminosity Sensor with a Rasp. Pi, as you did, and am using Occidentalis. But when I try to run your programs, they complain about missing smbus. I saw a suggestion that the smbus module was for Python version 2. Have not found one for version 3. You are writing it partly capitalized: SMBus, which must be different somehow.Tom Coxhttps://www.blogger.com/profile/08477290485769745881noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-48691649437749872612013-04-25T10:13:52.050-04:002013-04-25T10:13:52.050-04:00That's a good question. I seem to recall havi...That's a good question. I seem to recall having a problem with SMBus when I didn't use Adafruit's Occidentalis distro. I played with it for a bit, but ultimately just installed her linux flavor because everything just seemed to work. They (Adafruit) call it a very preliminary beta, but so far it's been incredibly steady.Statichttps://www.blogger.com/profile/10366235037249278451noreply@blogger.comtag:blogger.com,1999:blog-5009749739032040342.post-46019333186106268002013-04-25T06:17:11.126-04:002013-04-25T06:17:11.126-04:00This doesn't belong on this blog, but I don...This doesn't belong on this blog, but I don't know how else to reach you. I've seen some of your posts elsewhere, and think you may know something that I am trying to discover. The smbus module that I have found does not seem to be compatible with Python 3. Is there a version of smbus that IS?<br /><br />Tom Cox<br />tom@cox.orgTom Coxhttps://www.blogger.com/profile/10238984250949502200noreply@blogger.com