-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adapt SoftModem lib for ATTiny and other chips #17
Comments
Great, thanks for the attiny85 hint! Didn't had that on my radar. Will open a new issue at SoftModem and see what I can do. Unfortunately I don't have an ATTiny, so I can't test it. |
I'm happy to test, and anyone who has a tinyduino or a digispark can help; Also, it might be needed to do the same for Leonardo based arduinos, so |
Just pushed the new branch 'attiny-support' at rmeister/SoftModem. You can give it a try, it compiles. Remeber to:
Also I'm not sure if the pins for RX(0) and TX(1) are correct. This is the sketch I was able to compile:
|
Hmm, i get a bunch of errors like:
I can test again tomorrow morning, thanks for doing this! |
Then probably this did not work:
Can you verify that |
yes but see my latest response to your research note; i think perhaps there's something more basic wrong... |
This compiled:
Let me double check that I'm compiling for the right board... |
Taking a closer look at the software serial implementation for the Nanite, I've gotten this to run: https://codebender.cc/sketch:279140#Nanite841%20SoftSerial.ino so i'll adapt that. |
With that Nanite841 sketch, I got to this error:
|
In the Arduino IDE, I had to choose the ATtiny85 in two steps: first the boad |
Hmm, I don't see those. I'm on Arduino IDE 1.6.7, will check for more recent version. |
Wondering if there is a different between SoftSerial and SoftwareSerial? In the Arduino reference it is always called SoftwareSerial. |
Yes, SoftSerial is a Digispark-provided library I've gotten to work on an ATTiny before, thought I'd try it as an alternative. |
I'm now Arduino IDE 1.6.9, and I don't see I have to run now, but can give this another go tomorrow. Thanks! |
Yes I've added this URL to the boad manager: https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json |
Oh great, I'll try that. |
Sorry, that package was the wrong track. From your error log I can see that you already installed the right one: the digistump package. Digistump brings its own implementation of the Print class, which is why the return types of Also got a Digispark on friday, and to some extend it works with SoftModem (I managed to send data, but no receiving). Though, there is an issues with the ATtiny85: The analog comparator (used for receiving) shares pins with timer 0 (used for generating signals = sending) and therefore interfere, e.g. receiving while sending will not work. An other problem could be the accurracy of the system clock, that is about 10% if not connected to an USB device. |
Ah, interesting -- great sleuthing. So what are your next steps or needs? |
Think I'll evaluate if it is possible to alternate sending and receiving. What I forgot to mention is the possibility to change one of the comparator input pins and use an ADC pin instead. But this will disable all other ADC pins. As the purpose of this project is communication for sensors, this is probably not beneficial. |
And if you feel lucky, you can give your digispark a try 😄 https://github.com/rmeister/SoftModem/tree/attiny-support |
Leonardo will also be able to generate now. TX pin is 3, like for the Uno. |
hoping to get to this tonight; we'll see! |
I was able to successfully upload the test sketch onto both a Leonardo and a Digispark; I'll try attaching a headphone cable tomorrow! |
The Leonardo uploaded with the simple example sketch you provided here: https://publiclab.org/notes/rmeister/07-18-2016/webjack-testers-needed#2.+Load+this+sketch+to+the+Arduino |
Digispark blinks promisingly but I realized I have the wrong headphone plug... I'm going to try to grab another and modify but I am travelling this week, so hard to say. |
Cool, blinking sounds promising. Thanks for your effort! |
I wasn't able to find an affordable four pin cable at the airport, but I'm ...maybe after I land. Else I may be able to find a cheaper cable or a broken apple headset Eventually I hope well be able to program over audio too :-) |
OK, I was able to connect the Leonardo to the audio in, and confirm it's being played into the computer. This was with no extra circuitry -- just directly into the audio port. https://i.publiclab.org/system/images/photos/000/017/613/original/leonardo-webjack.mov But I didn't see it read by the webjack demo. Maybe it's blowing out with too much amplitude? |
Followup: I got the Leonardo sending, but not receiving (as you noted) using https://github.com/rmeister/SoftModem/tree/attiny-support. What would it take to get receiving working? Is this a timer issue as in the ATTiny side of things? Thanks! |
Sorry, moving last question to arms22/SoftModem#5 |
https://publiclab.org/notes/rmeister/07-18-2016/webjack-testers-needed#c15006
looking for ATTiny softmodem, i find:
https://github.com/l1q1d/SoftModem-for-attiny85
http://fab.cba.mit.edu/classes/863.12/people/Adam.Marblestone/AHM_week11.html
Maybe we can port in the mods which made it work on the Tiny architecture: l1q1d/SoftModem-for-attiny85@b6f08ca
Also happy to move this to your SoftModem fork instead of having it here
The text was updated successfully, but these errors were encountered: