Espruino Pico and SD cards #822
Replies: 39 comments
-
Posted at 2015-04-18 by the1laz I think you need to compile the firmware for it yourself, as filesystem isn't defined in the makefile for the pico. See this thread: http://forum.espruino.com/conversations/252934/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-18 by DrAzzy That thread is from before Gordon made it so you can have the filesystem on other pins though. With FS possible on pins specified at runtime, the Pico ought to have this compiled in, I reckon. Does anything other than USE_FILESYSTEM=1 need to be specified to build pico firmware with filesystem support? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-20 by the1laz Yeah, it would be a good one to compile in by default, if there's space for it. (Or maybe a candidate for implementing as an installable module, like the new ESP8266 module... but I suspect that's no easy task) I tried the sd card functions on my Nucleo board yesterday and they were undefined. If I get a chance I'll try compiling firmware for it with USE_FILESYSTEM=1 and give it a go, I've got an sd module I've been meaning to try out... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-20 by @gfwilliams
Shouldn't be - that's my fault... It has been done and tested on the Pico - I don't know how it got left out. I'll make sure it's in the new release. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-03 by Dennis E.connectSDCard is also undefined on my Pico :( What exactly do I have to do in order to make an external SD card breakout board work with the Pico? Re-compiling the firmware sounds messy, but if there were a step-by-step instruction, I would dare. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-04 by DrAzzy Have you updated firmware since you got the board? E.connectSDCard() has been in the firmware for over a month. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-04 by @gfwilliams @dennis, as @drazzy said, try updating the firmware on your Pico - there are some instructions on the Quick Start page, under 'Software Updates'. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-04 by Dennis Ah okay, I will do that. Thanks! With the original Espruino board, the IDE always showed the little exclamation mark on the top right when a new firmware was available. Since this icon doesn't appear when I'm connected to the Pico, I assumed that the Pico already has the latest firmware installed. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-04 by @gfwilliams Ahh, yes, it's something I've fixed and which I'll put in the next release of the IDE :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-07-02 by Cale So is there an example and tutorial available to connect an sd card to the Pico? Maybe a recommended breakout board? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-07-02 by Jorgen small example with SD card module connected to SPI1
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-07-02 by Cale Thank you Jorgen! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-15 by RangerMauve An suggestions for which SD card module would be easy to integrate? Or would anything go? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-16 by DrAzzy Just about any will work - they're like $1-3 shipped from china. You can even just solder wires onto a microSD to SD converter and connect directly... :-P |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-16 by PaulMoore Just done exactly that... having broken the SD breakout board :(Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by @gfwilliams Which one's the actual recording? Or did you not post that up yet? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by stephaneAG -> the raw audio files posted are what I aim to play -> I didn't record what I get yet ;/ -> yup, I'll just edit the File IO page on your github repo => quicker & simpler ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by stephaneAG haha, you ROCK ! ^^ the following worked on the buzzer
Also, it seems I can't use B4 nor B7 for my bigge speaker when connected to USB/serial & using SDcard on SPI1 ;pAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by stephaneAG since I gotta solder an additional wire, the next video ( with PICOSPK as output, aka 8 ohms 0.25W speaker ) 'll arrive a little after the above one ;) btw: I stumbled upon your "single button combination lock" -> I gotta say you made my day": with few modifs, it 'd be prety much what I needed for what I currently intend to do with the Pico pictured previously ;P Nb: I also think about adding an ESP8266 to have WiFI capabilities, but I don't have any shim at my disposal :/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by stephaneAG All right, I added a quick doc on how to hack an SD card adapter in the FileIO page -> I'll post back recordings of streaming off the SD & playing with the said-speaker as soon as done adding wires ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by stephaneAG all right, both seems to work, even if the volume of the speaker is not loud ;p nb: as B3 is also SPI1SCK, I guess it's not a good idea to have my buzzer on that pin, right ? ps:didn't know wiring a speaker to a buzzer 'd result in audio being played twice / Espruino OOM anyway, I post my current code below, it needs a few additions ( starting with "single button combination lock"-like input, which 'd trigger the rest, aka the playing audio & triggering a relay .. ) any personal hint on driving an 8 ohms speaker with a Pico using the smallest possible components while having a loud sound ? ( B0 stuff ? ) -> this being said, I'll be back [ right ] after reading the said-combination-lock tut' see ya ++Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-26 by stephaneAG codeAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-27 by @gfwilliams Great, glad it's working! Thanks for the pull request - I'll try and get it in soon. Yep, you can do WiFi and SD card no problem, as long as you're not trying to use the same pins for 2 different things... As long as you're not using the same pin for anything else, it's fine to use it for the speaker - but with something like an 8 Ohm speaker you should really drive it with something else as the Pico will be struggling to put out that much power! So you saw the Pico FET tutorial? That would be a good one to use if you don't need the battery capability. For best results, add a 100 Ohm resistor between the BatIn pin and GND, and a 10uF capacitor between BatIn and the speaker (then connect the other side of the speaker to GND). You could always look at buying an amplifier module - they're actually really cheap, and you just wire up power and GND. Then ideally you'd just add a capacitor and a resistor down to GND, and you could use any signal pin without the FET. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-28 by stephaneAG Hi there ! -> last message here: This being said, onto the good stuff, as well as few important questions I have left after re-re-reading the Pico documentation ;) -- the good stuff --
-- the questions left / thoughts on previous answers --
-- main subject/goal --
Thanks in advance for your help, as always useful, ps: as you'll notice in the pics, the relay is quite bulky for the available space: I plan to switch it with a a MOC3041M + BT138 or just a TIP120 if it's fine, but I'm less familiar with TIP120 & the said stuff than my little NPN/PNP PN2222/2N3904/2N3906 :/ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-28 by stephaneAG pot-pourri ;p Nb: I keep getting "413 Request Entity Too Large - nginx" ..Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-28 by stephaneAG next batchAttachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-28 by stephaneAG last batch !Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-28 by stephaneAG sorry for the rotated photos: didn't took the time to rotate them ..Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-10-29 by @gfwilliams Wow - sorry, I'm in a bit of a rush today so can't look through this properly. It'd be well worth posting separate questions in future though, as I doubt other people will be able to find the info they need in here ;)
They can all share SCK/MOSI/MISO - it's just that each needs its own CS pin.
Not sure I understand, you just use
No,
Yes, it's not a full reboot - but it still changes the pin states back to inputs and then starts again.
There were some posts here, but you just need two equal resistors to divide the voltage down to a level suitable for Espruino, then you use
Yes, if you don't use the battery input for a battery you can use it as you want. It's just that the FET input for the battery means you don't get a voltage drop - and otherwise you'd have to add a diode if you planned to use a battery and USB.
For LiPo batteries I'd strongly recommend you just buy a charger chip- they're cheap, easy, and won't blow your battery up :)
Yes, to me it looks like that'd work. Keeping the Pico running via a capacitor would work fine, and using a zener to limit the voltage to 3.6v would work fine too. HOWEVER: While you can put 12v on the Pico's 5V/VCC/VUSB pins and it won't cause problems, the B0 FET will only work when the Pico is powered from 5v or less. Any more and the FET will be constantly on. It would be significantly easier to use a separate amplifier in that case.
I don't really know - pretty much anything would work I imagine. The PAM8403 boards on eBay look good? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-09 by stephaneAG Hi there ! :D .. talking about rushes .. I've managed to extract myself from one ;p .. -> First of all, sorry for the late answer, & thanks for the great answer ;) -> The "bypass original mic audio" works FINE ! ^^ -> I 'll be testing the replacement for the relay this evening ( MOC3022M + BT138 ) -> "For the sake of clarity & Cie", I'm about to create a thread in Projects explaining the project, its current status & the bits that are left to be done, as well as links to the code -> Also, the test-code I wrote quickly to get an array of audio files from SD to randomly play from 'd surely benefit from refactoring to fit in wih the rest ( more on the Project thread ;p ) This being said, last few hours of work & I'll be back uploading stuff here ( .. ) => Also, I am working on some other handy stuff on which I'll be giving updates soon if it can be handy to one of us* :)
This being said, keep up the good work ++ ps: 'stumbled upon the memory page stuff you were talking about -> neat, can't wait to test that ^^ |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-04-18 by DrAzzy
Does this work?
I haven't tried it, but I just noticed that E.openFile was undefined there - which is not a good sign. Is SD card support not being built into the Pico?
Beta Was this translation helpful? Give feedback.
All reactions