(From https://www.arduino.cc/reference/en/language/functions/communication/wire/endtransmission/)--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/6EE08C87-E9E4-4ACD-B128-FB5C1BCF1B95%40brandeis.edu.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/CA%2BKVXVN6O20w%3DbJpRjyE6yuxE%2BTJ4veVHi6%3DBy5ZM6Pa2j3qFQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/122561491.21658.1720453154388%40mail.yahoo.com.
<Screenshot 2024-07-08 at 11.06.29 AM.png>(From https://www.arduino.cc/reference/en/language/functions/communication/wire/endtransmission/)
With that context, I am seeing the following:
- without anything connected to the i2c bus, the script simply checks all the addresses, sees no errors or devices, and reports “no i2c devices”
- with an i2c cable connecting to an i2c device the script reports an error on every single address. I’ve tried two different devices as well as different cables.
I measured the voltage on the i2c connector and it is 3.3V (for the red and black power wires.)
In some places I see mention of a pull up resistor but I am pretty sure I have not needed that in the past.
Any theory/suggestions?
Thanks!
PIto
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/6EE08C87-E9E4-4ACD-B128-FB5C1BCF1B95%40brandeis.edu.
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/122561491.21658.1720453154388%40mail.yahoo.com.
--
Best Regards,
-- Sergei
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/CA%2BKVXVPqtSJC4J34COC-oG71ELpOKPF5Qqcb6obLJutzhv-ong%40mail.gmail.com.
<Screenshot 2024-07-08 at 11.06.29 AM.png>(From https://www.arduino.cc/reference/en/language/functions/communication/wire/endtransmission/)With that context, I am seeing the following:- without anything connected to the i2c bus, the script simply checks all the addresses, sees no errors or devices, and reports “no i2c devices”- with an i2c cable connecting to an i2c device the script reports an error on every single address. I’ve tried two different devices as well as different cables.I measured the voltage on the i2c connector and it is 3.3V (for the red and black power wires.)In some places I see mention of a pull up resistor but I am pretty sure I have not needed that in the past.Any theory/suggestions?Thanks!PIto
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/6EE08C87-E9E4-4ACD-B128-FB5C1BCF1B95%40brandeis.edu.
--Best Regards,-- Sergei--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/CA%2BKVXVN6O20w%3DbJpRjyE6yuxE%2BTJ4veVHi6%3DBy5ZM6Pa2j3qFQ%40mail.gmail.com.
2. Use a more advanced I2C library - https://github.com/Richard-Gemmell/teensy4_i2c - it has a "Wire" wrapper if you don't want to do anything unusual.
My code is here, just in case: https://github.com/slgrobotics/Misc/blob/master/Arduino/Sketchbook/Teensy_PCA9685/PCA9685Emulation.cpp
// Teensy 4.0 Wire: SDA: 18 SCL: 19// Wire1: SDA: 17 SCL: 16
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/A1B304A3-0116-4167-87E2-838B58CBA357%40brandeis.edu.
void setup() { Serial.begin(38400); pinMode(8, INPUT_PULLUP); } void loop() { if (digitalRead(8) == HIGH) { Serial.println("Button is not pressed..."); } else { Serial.println("Button pressed!!!"); } delay(250); }
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/d7347302-3578-493f-8090-8ab9b4f3bdb8n%40googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/4F9B1DC3-112C-4E2D-8D3B-6D49D1D7FBD4%40gmail.com.
> How about testing the SCL and SDA pins directly (as generic GPIO, LED Blink sketch) to see if they are alive?
Sounds interesting… But how would I do that?
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/74A33610-3A94-4A85-B772-CEA30C1F91BA%40gmail.com.
|
![]() | |
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/30E10AB1-0AEE-49C2-B729-30F0C8FB182B%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/4F9B1DC3-112C-4E2D-8D3B-6D49D1D7FBD4%40gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hbrobotics/FGb6cd-uO_E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/1ADA73D0-3B8B-43BF-9CEF-F5DF2216C38F%40gmail.com.
Pito...As a firmware programmer working on driver routines for the last 39 years I can't stress the importance of a logic analyzer.They are under $20.00 on ebay...some as low as $10.00...Stop wasting time with guessing and look at the signal.Daniel
On Wednesday, July 10, 2024 at 5:21:36 PM UTC-7 Dan wrote:
Pito...As a firmware programmer working on driver routines for the last 39 years I can't stress the importance of a logic analyzer.They are under $20.00 on ebay...some as low as $10.00...Stop wasting time with guessing and look at the signal.Daniel
As a systems engineering generalist for the past 30-ish years, I'm gonna cut a few milliseconds quicker to the chase and suggest this:
https://www.crowdsupply.com/excamera/i2cdriverThey also make one for SPI:
https://www.crowdsupply.com/excamera/spidriver
Those look really nice! More tools to order! Thanks.
sdw
Does it do everything a full-on Logic Analyzer or Oscilloscope does ?--No, it does not. It has no frequency range settings, it doesn't have triggers or sampling. It doesn't store presets.
What it does do though is enumerate the I2C devices plugged into it, gives you a little graph of the pulse-train and the voltage and current being used.Which tells you right away if the problem is with the device itself, or with your code or wiring.
Get the Analyzer like Dan is suggesting and then set aside a weekend to figure out how to really use it *after* you've solved your current I2C problem.
'dillo
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/8398f8a2-889e-4398-a447-526fca1215fbn%40googlegroups.com.
|
Stephen D.
Williams
Founder: VolksDroid, Blue Scholar Foundation |
![]() | |
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/79dd43f0-b472-4e9d-8432-9bd1ec8ff2e7%40lig.net.
On Jul 11, 2024, at 3:24 PM, Chris Albertson <alberts...@gmail.com> wrote:
These things are cheap enough that you can afford to buy several of them so you can leave it connected to a robot you are building.
Not only are they good for serial communication debugging but let’s say you are trying to make a servo run using PWM. It will measure the pulse width of the PWM. This is how I found that the common I2C based PCAxxx PWM chip was very inaccurate. Not a bug just a “feature” of that chip. For $10 you can leave the analyser on the robot as it runs and logs up to 8 signals to disk. I can see the lag in the PID algorithm from encoder to PWM.
Also, it is a “free” why to use print statements for debugging. I can define one spare pin as a serial out and “print” to that pin and the logic analyser will decode the pin to text and I can see the debug prints in context with the signal pins all with u-second level timing marks.
Other times print statements will slow the code too much, so the analyser can record the raw digital signals with no code changes.
It you are teaching, buy a dozen of them and loan therm to students or if students must buy their own tools, tell them “This goes in the kit along with your multimeter and screwdrivers."
On Jul 11, 2024, at 11:34 AM, 'Stephen Williams' via HomeBrew Robotics Club <hbrob...@googlegroups.com> wrote:
On 7/11/24 8:13 AM, Steve " 'dillo" Okay wrote:
On Wednesday, July 10, 2024 at 5:21:36 PM UTC-7 Dan wrote:
Pito...As a firmware programmer working on driver routines for the last 39 years I can't stress the importance of a logic analyzer.
They are under $20.00 on ebay...some as low as $10.00...Stop wasting time with guessing and look at the signal.
Daniel
As a systems engineering generalist for the past 30-ish years, I'm gonna cut a few milliseconds quicker to the chase and suggest this:
They also make one for SPI:
Those look really nice! More tools to order! Thanks.
sdw
Does it do everything a full-on Logic Analyzer or Oscilloscope does ?--No, it does not. It has no frequency range settings, it doesn't have triggers or sampling. It doesn't store presets.
What it does do though is enumerate the I2C devices plugged into it, gives you a little graph of the pulse-train and the voltage and current being used.
Which tells you right away if the problem is with the device itself, or with your code or wiring.
Get the Analyzer like Dan is suggesting and then set aside a weekend to figure out how to really use it *after* you've solved your current I2C problem.
'dillo
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/8398f8a2-889e-4398-a447-526fca1215fbn%40googlegroups.com [groups.google.com].--
Stephen D. Williams
Founder: VolksDroid, Blue Scholar Foundation 650-450-8649 | fax:703-995-0407 | s...@lg.net | https://VolksDroid.org [volksdroid.org] | https://BlueScholar.org [bluescholar.org] | https://sdw.st/in [sdw.st]
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/79dd43f0-b472-4e9d-8432-9bd1ec8ff2e7%40lig.net [groups.google.com].
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/0A1084F1-802C-47A9-84B9-526A820C16EF%40gmail.com [groups.google.com].