Go to advanced search

by BAStumm
Fri Jun 06, 2014 6:48 pm
Forum: C/C++
Topic: wiringPi i2c help
Replies: 9
Views: 8597

Re: wiringPi i2c help

Is it unusual to pass more than one byte at a time in i2c? I'm not very familiar with using this type of communication. I see many places with this device where more than one byte need passed. To set a gpio pin you have to send the command in hex followed by the data (0 or 1). To read temperature yo...
by BAStumm
Fri Jun 06, 2014 3:13 pm
Forum: C/C++
Topic: wiringPi i2c help
Replies: 9
Views: 8597

Re: wiringPi i2c help

For the sake of anyone that stumbles across this in the future... The device I'm trying to talk to returns 4 bytes of data. Originally I was trying to make 4 calls to int wiringPiI2CRead (int fd) ; which does not work. What I had to do was use a read() to get the data. I'm still using other wiringPi...
by BAStumm
Mon Jun 02, 2014 8:46 pm
Forum: C/C++
Topic: wiringPi i2c help
Replies: 9
Views: 8597

wiringPi i2c help

I'm pretty new to this i2c stuff and wondering if wiringPi can achieve what I need for communicating to a mod-tc-mk2 UEXT module. I'm unsure how to send/check ack's, stop/start i2c and things of this nature using wiringPi built in i2c helper functions. Here is the flow I need to acheive (from the de...
by BAStumm
Thu May 29, 2014 5:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MOD-TC-MK2-31855
Replies: 6
Views: 1896

Re: MOD-TC-MK2-31855

Sorry for the late response, I guess I didn't have notifications turned on for this topic. modprobe -r i2c_bcm2708 modprobe i2c_bcm2708 baudrate=32000 Once I executed this on my Pi it just started working (it also works at baudrate 80000 but not 100000). I've tested with current and previous version...
by BAStumm
Tue Apr 01, 2014 7:33 pm
Forum: Automation, sensing and robotics
Topic: Controlling GPIO through web via keypress
Replies: 10
Views: 5219

Re: Controlling GPIO through web via keypress

Seems this could also be done using javascript to detect the key presses, wiringPi command line stuff and PHP to call wiringPi via exec() or system() functions. For someone familiar with C code, PHP is pretty similar...
by BAStumm
Fri Mar 28, 2014 6:11 pm
Forum: Automation, sensing and robotics
Topic: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $3.05
Replies: 81
Views: 113307

Re: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $

These are not home-brew reflow ovens. I work for an oven manufacturer.
by BAStumm
Thu Mar 27, 2014 8:01 pm
Forum: Automation, sensing and robotics
Topic: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $3.05
Replies: 81
Views: 113307

Re: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $

The MOD-TC I use is I2c and I use 6+ of these devices per oven (multi-zone ovens for solder reflow if you are familiar with that). At each heat zone I have a single device that reports back temperature and wattage while performing PID closed loop control of either temperature or wattage (depending o...
by BAStumm
Thu Mar 27, 2014 5:35 pm
Forum: Automation, sensing and robotics
Topic: Beer Brewing Automation
Replies: 3
Views: 1840

Re: Beer Brewing Automation

Hale's Lager doesn't have the same ring as it would for Ale...
by BAStumm
Thu Mar 27, 2014 4:22 pm
Forum: Automation, sensing and robotics
Topic: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $3.05
Replies: 81
Views: 113307

Re: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $

I'm dealing with industrial ovens that operate at temperatures in excess of 300 degrees C (or more than 600F). Cost isn't that high, about $3 per T/C with a 3 meter lead. The mod-tc-mk2 is $15. I'd probably go a different route if I didn't need the temperature rating.
by BAStumm
Thu Mar 27, 2014 4:10 pm
Forum: Automation, sensing and robotics
Topic: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $3.05
Replies: 81
Views: 113307

Re: TUTORIAL: DS18B20 temp sensor. No C or Python!!! Cost: $

I'm using this: https://www.olimex.com/Products/Modules/Sensors/MOD-TC-MK2-31855/open-source-hardware Accepts a Type K thermocouple, has analog input (attach a current sensor for True RMS wattage feedback) and GPIO for pulsing a solid state relay. This allows for temperature and/or wattage control o...
by BAStumm
Thu Mar 20, 2014 4:20 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RasPi and PIC I2C read problem
Replies: 17
Views: 7599

Re: RasPi and PIC I2C read problem

Code: Select all

modprobe -r i2c_bcm2708
modprobe i2c_bcm2708 baudrate=32000
by BAStumm
Thu Mar 20, 2014 4:13 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RasPi and PIC I2C read problem
Replies: 17
Views: 7599

Re: RasPi and PIC I2C read problem

Try a lower i2c baud rate on the pi.
by BAStumm
Fri Mar 14, 2014 2:03 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RasPi and PIC I2C read problem
Replies: 17
Views: 7599

Re: RasPi and PIC I2C read problem

Did you check both i2c bus? Pics use clock stretching, slow the pi i2c bus
by BAStumm
Fri Mar 14, 2014 2:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: RasPi and PIC I2C read problem
Replies: 17
Views: 7599

Re: RasPi and PIC I2C read problem

Does the pic show when you run i2cdetect?
by BAStumm
Tue Feb 04, 2014 6:18 pm
Forum: Automation, sensing and robotics
Topic: automatic garden beds
Replies: 8
Views: 1747

Re: automatic garden beds

I'll tend to agree with Gert. The mechanical and safety part of this project is serious business. Torsion springs would help greatly but they need shielded from hands and such. I would still recommend exploring a system that uses lead screws engineered to prevent back-rotation. I use these kinds at ...
by BAStumm
Mon Feb 03, 2014 7:44 pm
Forum: Automation, sensing and robotics
Topic: automatic garden beds
Replies: 8
Views: 1747

Re: automatic garden beds

Most garage doors use torsion springs.
by BAStumm
Sun Feb 02, 2014 3:38 pm
Forum: Automation, sensing and robotics
Topic: automatic garden beds
Replies: 8
Views: 1747

Re: automatic garden beds

As other stated, this is not going to be cheap compared to a raised bed that doesn't raise up. But I am not one to say "impossible". I'd start with a 2 start, 0.200" per rev lead screw (at least 4) along with worm gear 30:1 ratio. This gives you 300:1 mechanical advantage or lift a 30...
by BAStumm
Wed Jan 22, 2014 7:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C not working on my Raspbian
Replies: 13
Views: 2062

Re: I2C not working on my Raspbian

I had an issue recently with clockstretching and baudrate. I slowed the i2c baud to 80k (down from 100k) to get things working with a pic processor.
by BAStumm
Mon Jan 20, 2014 9:15 pm
Forum: Automation, sensing and robotics
Topic: Jumping in head first
Replies: 11
Views: 2233

Re: Jumping in head first

Python isn't the only language people use on the RPi. I code in C and utilize the wiringPi library.
by BAStumm
Mon Jan 20, 2014 8:49 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C - MCP23017 - IO Error: [Errno 5]
Replies: 11
Views: 5035

Re: I2C - MCP23017 - IO Error: [Errno 5]

Also, there is a library for mcp23017 in wiringPi. Might be worth checking out the example projects in C. You might find that it's not too hard to learn. Or perhaps those libraries are also ported to python.
by BAStumm
Mon Jan 20, 2014 8:44 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C - MCP23017 - IO Error: [Errno 5]
Replies: 11
Views: 5035

Re: I2C - MCP23017 - IO Error: [Errno 5]

I believe the library was ported to python. Not sure if threading is supported or not. You could check it out. Try searching the forums, I've never installed nor used the python version.
by BAStumm
Mon Jan 20, 2014 8:36 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 35890

Re: Fast ADC with MCP3208

I believe this change fixed the bug in mcp3422/wiringPi. With nothing connected it returns 0 as value. With channel 1 shorted to 3v3 I get a value of 4095. This is using my example code above.
by BAStumm
Mon Jan 20, 2014 8:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C - MCP23017 - IO Error: [Errno 5]
Replies: 11
Views: 5035

Re: I2C - MCP23017 - IO Error: [Errno 5]

Sorry, not a python guy. If it were me I'd use a wiringPi and it's built in threading then interrupt on rising or falling edges. Just a quick thought. I have some code that pulses a stepper motor (in a separate thread than main loop) and it can pulse several thousand times per second.
by BAStumm
Mon Jan 20, 2014 7:43 pm
Forum: Automation, sensing and robotics
Topic: Fast ADC with MCP3208
Replies: 69
Views: 35890

Re: Fast ADC with MCP3208

Now it returns immediately with values of zero.

Code: Select all

pi@raspberrypi:~/wiringPi/examples$ sudo ./adc-pi 
ADC-Pi analogRead Program
mcp3422Setup=0
val=0
val=0
pi@raspberrypi:~/wiringPi/examples$ 

Go to advanced search