Comments (11)
Hiya,
I was just going through the config, as I don't actually have an official adafruit MotorHAT to test this on, but it seems my (clone) board has a different i2c address than the default adafruit one.
Could you change that line for:
var motorHat = require('motor-hat')({
address: 0x60,
steppers: [
['M1', 'M2'],
['M3', 'M4']
]
});
and see if it makes any difference?
Alternatively, check in Adafruit's python code, in the file Adafruit_MotorHAT_Motors.py, around line 227 you should have a line similar to this:
class Adafruit_MotorHAT:
[...]
def __init__(self, addr = 0x60, freq = 1600, i2c=None, i2c_bus=None):
If that address (addr) is not 0x6F (default in my library) change it to whatever's in there (0x60 in this case).
Hope that helps.
Cheers
from motor-hat.
I'm trying to do some development to prepare for a motor hat arriving on Tuesday. Could a lack of motor hat be the issue? Since there's technically no i2c device installed?
from motor-hat.
Hey there,
sorry for the delay, I recently moved house and just got all my setup back in place to test with the rpi. Did you manage to get it working with the actual MotorHAT?
It does sound like it could be a problem with the board not beeing there, but I haven't been able to reproduce it yet.
from motor-hat.
I wasn't able to get it working. When using Adafruit's example python code, I could get the hat to run, but when using this library, I still had the error thrown. The breaking code looks like:
var motorHat = require('motor-hat')({
steppers: [
['M1', 'M2'],
['M3', 'M4']
]
});
from motor-hat.
Ok. I'll give it a go. Seeing address 0x60
seems to ring a bell, so I'll let you know if that helps. Thanks again!
from motor-hat.
Hi @richiepreece ,
any luck with this? should I close the issue?
from motor-hat.
Hey, my brother in law has the hat, so I've been unable to test. Sorry! Feel free to close the issue
from motor-hat.
Setting the address solved this issue for me. Maybe it should be default?
Thank you for your work on this!
from motor-hat.
Just wanted to say I had the exact same problem above. I came here to whine about it and saw the post above with the identical issue.
Based on that I tried the "address: 0x60", which I hadn't seen in the documentation and poof - it worked! Coolio! Thanks! I have two Adafruit stepper hats and default i2c addresses it uses are 0x60 and 0x70. Thanks again!
from motor-hat.
@jcane86 Thanks for the handy lib. I can see that this is referenced in the readme, but it would have been really handy for me to have known that the "non-default" was the "default" for the official hat. Could that be added to the readme for others? I wasted a lot of time on this step. Thanks.
from motor-hat.
@violuke Yeah, point taken. I started this for myself, and I don't have an official hat, so it kinda grew from there.
Do you think there's a better way to default this? I'm a bit hesitant to just make the official one default, as it would break it for anyone using the default. Maybe that's not a lot of people anyway.
Otherwise, feel free to open a PR with some more clarification to the readme, that would be much appreciated.
Thanks for your feedback!
from motor-hat.
Related Issues (20)
- An in-range update of eslint is breaking the build 🚨 HOT 1
- Issue: We dont recognize your revision
- An in-range update of semantic-release is breaking the build 🚨 HOT 1
- Installation failing on Raspberry Pi 4, node 13.9.0, npm 6.13.7 HOT 19
- Installation failing on Raspberry Pi 4, node v12.16.1, npm 6.13.4 HOT 5
- Id not recognized HOT 7
- Revision ID not recognized: new issue for Raspberry Pi 4 HOT 1
- An in-range update of semantic-release is breaking the build 🚨 HOT 4
- An in-range update of sinon is breaking the build 🚨 HOT 4
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- An in-range update of semantic-release is breaking the build 🚨 HOT 4
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- An in-range update of isparta is breaking the build 🚨 HOT 2
- An in-range update of semantic-release is breaking the build 🚨 HOT 10
- The automated release is failing 🚨 HOT 2
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- busnum is not passed to pwmlib HOT 3
- An in-range update of semantic-release is breaking the build 🚨 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motor-hat.