|
Are there any good, tutorials for ESP-8266+arduino nano/uno? I'm struggling with basic connectivity. Through googling I got the blynk+esp8266 libraries working using this tutorial, but I'd like to use other libraries. https://www.hackster.io/nolan-mathews/connect-to-blynk-using-esp8266-as-arduino-uno-wifi-shield-m1-46a453 I cannot even get my ESP to connect to my wi-fi network using these libraries: https://github.com/ekstrand/ESP8266wifi ITEADLIB_Arduino_ESP8266, which is deprecated I see, https://github.com/itead/ITEADLIB_Arduino_WeeESP8266 The next step will be getting the arduino to send and receive UDP broadcast messages.
|
# ? Apr 9, 2016 06:06 |
|
|
# ? May 30, 2024 14:12 |
|
You know you can program the ESP-8266 directly in the Arduino IDE, right? Unless you're doing a bunch of analog inputs, the ESP-8266 has similar memory and a way faster microprocessor than the Arduino. Here is my Arduino sketch for an ESP-8266 to connect to my wifi and post data to thingspeak via it's API (and blink an LED while doing it on one of the pins): http://pastebin.com/Jrt7idiZ
|
# ? Apr 9, 2016 09:16 |
|
Star War Sex Parrot posted:Look up some tutorials on finite state machines and implementation methods for C. This is the correct answer but it's also not super helpful for a guy at his level. Check out the Wikipedia page on "finite state machine" and try to imagine what it's like to read that when you don't even know what a global variable is. SkunkDuster, you need to specifically look at the Arduino switch/case examples in File > Examples > 05.Control. The switch/case structure (babyeatingpsychopath has posted a version of it as well) is the most straightforward way to give your program a bunch of different "modes" that are independent of one another.
|
# ? Apr 9, 2016 10:03 |
|
Hadlock posted:You know you can program the ESP-8266 directly in the Arduino IDE, right? Unless you're doing a bunch of analog inputs, the ESP-8266 has similar memory and a way faster microprocessor than the Arduino. Luckily I already have a NodeMCU ESP breakout board I can start playing with.
|
# ? Apr 9, 2016 11:33 |
|
First successful project brainstormed, breadboarded, breadboarded again, soldered, unsoldered (x100, don't solder in a room with low light or for several hours at once), and sort of cased together. https://www.youtube.com/watch?v=v-jrRzV0Fho
|
# ? Apr 9, 2016 17:22 |
|
That's cool, congrats! What do the resulting photos/videos look like? I'm almost done with one of the projects too, but am having an issue moving it over to a Pro Mini (or just the chip if I had one) for size. The CH340G programmer's LED doesn't turn on and it gets very hot quickly when connected to the 'duino. The pins on the programmer and Pro Mini are:
Any ideas what could be going wrong or how to debug this? Edit: gently caress, I think the board is busted. I tried powering it directly, and while GND and RAW do nothing, GND and VCC shorted out the power supply. The corresponding programming headers are also shorted together. Not sure if my first attempt caused that it it was already broken. I know it's jut $1 on ebay but I don't want to wait mobby_6kl fucked around with this message at 00:13 on Apr 10, 2016 |
# ? Apr 9, 2016 17:53 |
|
https://123d.circuits.io/lab?utm_content=buffer7d2f5&utm_medium=social&utm_source=facebook.com&utm_campaign=buffer This looks like a pretty cool way to learn stuff. As for quality of my camera, not too good. Only 2MP. I should figure out how to focus it and adjust settings if possible. https://www.youtube.com/watch?v=yd60Sxf1P1o
|
# ? Apr 10, 2016 15:45 |
|
I'm back, with a money saving question about PCF8574s. I need to use 2 PCF8574s in an ESP-8266 project. One for an LCD and one for a 4x4 keypad. Can I use these "LCD" breakout boards as i2c i/o boards instead of stand alone i2c i/o extension boards? The cost savings are quite high. ~3 USD http://goods.ruten.com.tw/item/show?21607801757116 ~1 USD http://goods.ruten.com.tw/item/show?21407301390505 The LCD boards don't have the extra i2c extension headers, or address jumpers, but I don't think that's a huge problem. I can ignore the potentiometer because I won't be using that pin. Luckily I'm not building for power efficiency yet, so I can ignore the power LED. http://masteringarduino.blogspot.tw/2013/12/lcdi2c.html I'm not ready to start etching my own boards, or start doing SMD soldering. A 16 pin DIP will cost as much as one of these LCD breakout boards. So if I can use these in my projects, great! Using ESP-01s with i2c might ultimately be cheaper than using NodeMCU boards. If this is possible, I may even add another LCD i2c board to get more i/o's.
|
# ? Apr 11, 2016 14:03 |
|
politicorific posted:I'm back, with a money saving question about PCF8574s. I need to use 2 PCF8574s in an ESP-8266 project. One for an LCD and one for a 4x4 keypad. My boards arrived, I discovered this... guess I get to learn how to do SMD soldering sooner than I expected: The answer to my original question appears to be yes, it is possible to use these cheaper i2c boards instead of the more expensive ones. However, the i2c keypad library is a mess; it was never updated to handle arduino 1.0 - I tried fixing it using the suggestions I found, but it didn't work. http://playground.arduino.cc/Main/I2CPortExpanderAndKeypads The cheaper board's address appears to be 0x27, whereas the more expensive one is 0x38 - I determined using this: http://playground.arduino.cc/Main/I2cScanner I was most interested in figuring out where the PFC8574's i/o pins are on the cheaper board. Here's the pin out. pre:i2cLCD 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1602 VSS VDD V0 RS RW E D0 D1 D2 D3 D4 D5 D6 D7 A K PCF8574 P0 P1 P2 P4 P5 P6 P7 P3
|
# ? Apr 13, 2016 16:54 |
|
politicorific posted:My boards arrived, I discovered this... guess I get to learn how to do SMD soldering sooner than I expected: Wow that's a pretty amazing error. They obviously do absolutely no testing at all and just slapped parts on a board and threw it through the oven. If people are wondering if it's worth buying dirt cheap stuff from eBay, this is the kind of stuff you get. At least you're not out a ton of cash.
|
# ? Apr 13, 2016 18:53 |
|
mod sassinator posted:Wow that's a pretty amazing error. They obviously do absolutely no testing at all and just slapped parts on a board and threw it through the oven. If people are wondering if it's worth buying dirt cheap stuff from eBay, this is the kind of stuff you get. At least you're not out a ton of cash. I just got a prototyping shield that the through holes for each resistor aren't wide enough so the resistors aren't flush with the board. On an unrelated note, I accidentally mixed up wires and sent 12V pulsing through my Arduino with a short. Goodbye Arduino.
|
# ? Apr 13, 2016 22:46 |
|
What a day! http://imgur.com/nBlD9Qz I figured I'm going to be making a lot of different projects, so I should build my own programming station. The programmer plugs into the four pins at the top. The switch at the top powers on the unit (red LED)and the switch at the bottom is for putting it into regular mode(green LED, but I just finished uploading a sketch from the Arduino IDE) or boot loader mode. I also have GPIO0 and GPIO2 broken out. In this photo I have blink running on 2 LEDs. I thought I had a short circuit and began pulling apart the board(actually removed the 100uf cap) until I remembered that the ESP-8266 pulls too much current and the PL2303 usb programmer will start freaking out. I'll incorporate a better power option later, and probably do something with a transistor switch to indicate whether it's in bootloader or regular mode. This tutorial was helpful for getting the pinouts correct: https://www.hackster.io/rayburne/esp8266-01-using-arduino-ide-67a124 And again, this tutorial was good for firmware flashing information: https://www.hackster.io/nolan-mathe...ng___&offset=38 Also, good god is Windows 10 awful for python. I used my chromebook to reflash the espys, and PC for uploading sketches. I'm very satisfied. politicorific fucked around with this message at 14:00 on Apr 16, 2016 |
# ? Apr 16, 2016 13:57 |
|
politicorific posted:My boards arrived, I discovered this... guess I get to learn how to do SMD soldering sooner than I expected: SMD was daunting to me until I was forced to do it as part of my job. Once I did it a couple times, I realized it was a lot easier than I had imagined. A hot air rework station is great for removal of the chip if you can get the plastic parts off the board before heating it up. A microscope and flux pen make reinstalling the chip very easy. Just soak the leads with flux and tap tap tap with the soldering iron tip to flow the joints. I use 450c temp on the hot air and 400c on the soldering iron and that seems to work pretty well. Does anybody have any wiring coloring schemes that work well for them? I've looked to see if there are any standards for jumper wires and there aren't, so I've just been using the ATX standard for BLK(COM), RED(5V), YLO(12V), and ORN(3,3V) power wires but haven't come up with any good scheme for other stuff like INPUT, OUTPUT, TX DATA, RX DATA, Bias, etc. edit: I'd reflow that SCL connection. edit 2: The is a functional (I didn't say good) rework unit. I've purchased 5 of them between work and home and they do the job well enough even if the build quality and features aren't that great. Pick whatever one is cheapest. I'm pretty sure they are all identical units that are rebranded. http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=hot+air+rework+853 Skunkduster fucked around with this message at 05:18 on Apr 17, 2016 |
# ? Apr 17, 2016 05:08 |
|
SkunkDuster posted:Does anybody have any wiring coloring schemes that work well for them? I've looked to see if there are any standards for jumper wires and there aren't, so I've just been using the ATX standard for BLK(COM), RED(5V), YLO(12V), and ORN(3,3V) power wires but haven't come up with any good scheme for other stuff like INPUT, OUTPUT, TX DATA, RX DATA, Bias, etc. Well, if your pins have numbers, you can use the resistor color code. Ribbon cables for instance are usually arranged in that order. I've seen a lot of pseudo-standards used by specific manufacturers or in specific industries (e.g. on most motorcycles, the right side turn signals use pale blue wires, the left ones use orange) but never anything that's actually defined anywhere. I tend to use GND: black Vcc: red higher voltage (e.g. 12v in a predominantly 5v system): orange inputs (e.g. the signal pin on a sensor) : green outputs (e.g. PWM output to a MOSFET): yellow If you have a whole bunch of parallel inputs and outputs...well, that's why you bought a multimeter with audible continuity testing, right? I also use a lot of I2C devices, so I usually go with SCL: white SDA: blue This all falls apart when you start using any devices that have their own wires, though. And even manufacturers of a super common otherwise-standardized device can't figure it out. I looooove telling my students "Okay, a servo's ground line is the black one. Except when it's brown, or white. White is also sometimes the signal line except when it's yellow, or orange. But it won't be orange when the 5v line is orange. Good luck!"
|
# ? Apr 18, 2016 00:53 |
|
Simpler Arduino Uno programs should be able to compile as-is on an Arduino Zero, right? I need a programmer for my ESCs of my quadcopter, and it appears that an Uno can do this job just fine. It essentially just relays data between the virtual COM port and the 1-wire connection to the ESC. But I have a spare Zero instead.
|
# ? Apr 19, 2016 17:17 |
|
I'm trying to configure the INT0 interrupt to act like a one-shot edge detector that will monitor some signal IN_PIN for an upward transition and then briefly pulse OUT_PIN before going back to being quiet for a while. I stripped down my code to what is shown below, where I periodically enable INT0 in the main loop and disable it in its' own ISR to make it a one-shot. code:
As I was messing around with the code I noticed that removing the final EIMSK=0 line in the ISR caused the output pulses to line up with the positive edge transitions of the input pulses, but of course now we loose the triggerable one-shot behavior that I was hoping for: Any ideas as to what causes setting EMISK=0 to make INT0 go crazy like this? A also tried more carefully making the bits I wanted to change in case some of the reserved bits in that register were connected to something important, aka EMISK&=0xFC but it didn't change anything. e: less table-breaking images PDP-1 fucked around with this message at 19:29 on Apr 19, 2016 |
# ? Apr 19, 2016 17:59 |
|
Combat Pretzel posted:Simpler Arduino Uno programs should be able to compile as-is on an Arduino Zero, right? Yeah most libraries support the Zero now, and all the basic Arduino functions work fine too. One thing to watch out for though is that the I/O on the Zero is 3.3V and not 5V like the Uno. So if you have stuff going to digital inputs be careful that it's 3.3V instead of 5V. You probably won't kill the chip if it is, but better safe than sorry.
|
# ? Apr 19, 2016 18:37 |
|
Hrm, I have VCC, ground and signal. If I put 5V on the first two and then connect the signal wire to a GPIO pin, this should work, right? I mean, the flight controller is based on an STM32, which should also be 3.3V. The ESC gets power from the LiPo at 11.1V and only the signal wire is hooked to the FC. --edit: I figure I should power my quad later today and measure how much volts pad through signal. Combat Pretzel fucked around with this message at 19:06 on Apr 19, 2016 |
# ? Apr 19, 2016 19:00 |
|
if you're worried about it, you can always stick a pair of resistors on the signal line for level shifting.
|
# ? Apr 19, 2016 19:33 |
|
PDP-1 posted:I'm trying to configure the INT0 interrupt to act like a one-shot edge detector that will monitor some signal IN_PIN for an upward transition and then briefly pulse OUT_PIN before going back to being quiet for a while.
|
# ? Apr 19, 2016 19:33 |
|
Eh, I've ordered another Uno. Plenty of multicopter stuff is 5V, and I can do other poo poo with it than with a simple programmer, while not that much more expensive.
|
# ? Apr 19, 2016 19:45 |
|
Is there any good write ups for doing controls with an LCD screen? Example of what I'm talking about is I have screens that go through a setup process and then run something. Screen 1: Check Motors Screen 2: Take Test Measurement and make Adjustments Screen 3: Run Program I feel like my code is really messy and not well organized. I'm wondering if you guys have any suggestions for a way to make it all look neater?
|
# ? Apr 20, 2016 00:55 |
|
PDP-1 posted:I'm trying to configure the INT0 interrupt to act like a one-shot edge detector that will monitor some signal IN_PIN for an upward transition and then briefly pulse OUT_PIN before going back to being quiet for a while. Otherwise I would guess that the interrupt has a little bit of setup time between getting enabled and firing off, and hitting the enable a hundred times a second is causing issues. You could leave the interrupt enabled and use a flag to control whether or not it pulses the output pin. Or even set a flag in the interrupt, and use the main loop to respond to the flag. That would minimize the hardware access you're doing.
|
# ? Apr 20, 2016 03:11 |
|
Eh, maybe it applies here too. When I was writing the PWM code on my Arduino Zero, whenever I set a flag, I had to run a while() loop waiting until the CPU acknowledged it to be set before proceeding. --edit: Sorta like this: CPUFLAG |= FLAG_FOO; while(!(CPUFLAG & FLAG_FOO)); Combat Pretzel fucked around with this message at 11:59 on Apr 20, 2016 |
# ? Apr 20, 2016 11:55 |
|
JawnV6 posted:If you're comfortable enough using EIMSK registers, maybe you could skip using digitalWrite and send values directly to the pin registers instead. Also, put another (lightweight) pin write in the loop and toggle it when you're re-enabling INT0. Pull that up on the scope and see when that's occurring. Thanks for the comments. I added a second output pin to show when INT0 was getting enabled and it revealed that INT0 was firing off instantly after being turned on. I read up on how interrupts are generated and found this: So basically you have to write a 1 to the flag bits to set them to 0, as clearly spelled out on one line buried in the 660 page datasheet. I had been writing a 0 to EIFR to make it 0 like some kind of goddamn fool. Anyway, after making that one change everything is working great and one-shotting like I wanted with pretty tight timing. Captain Cool posted:EIFR bits are cleared by writing 1, not 0. It would be strange if that fixed your problem, but it's worth a shot. See, this guy read the 660 page manual cover-to-cover. It actually did fix the issue, and there doesn't seem to be much of a set-up time needed according to my scope - maybe a handful of clock cycles to finish whatever instruction is currently being processed and jump to the ISR vector.
|
# ? Apr 20, 2016 15:54 |
|
PDP-1 posted:See, this guy read the 660 page manual cover-to-cover.
|
# ? Apr 20, 2016 18:10 |
|
Captain Cool posted:Actually I had never seen those acronyms before but google took me to a random blog with code that wrote 1 which I confirmed in the manual. But it's good to know that's indistinguishable from knowing it by heart.
|
# ? Apr 20, 2016 20:56 |
|
Thank you for the info about smd soldering, but the part is $3... not sure if I want to spend $100 to save it just yet
|
# ? Apr 21, 2016 16:27 |
|
I just got a project working in an evening with Arduino - I'm sure my code is horrificly inefficient, but it works, and it works 100% of the time, so I'm calling it a win. First code I've written from scratch, too, instead of adapting something already written - not bad for 2nd project! I now know all about while loops. Well, I know one thing about while loops... not sure what goes in the {} after while (thing) {} but I didn't need that, just the (thing) part. I also know I have a stupid and pointless diode in the circuit - I think I was trying to do a commuter diode like for a speaker, but instead I used a piezo buzzer and at the time decided I needed the diode in series . Oh well, still works. Incidentally, this project was a bit cathartic for me. It does the same as one I spent months on at the end of high school (pre-arduino days) arsing about with thyristors (and still never got it working 100% correctly). Balance is restored!
|
# ? Apr 21, 2016 17:38 |
|
simplefish posted:not sure what goes in the {} after while (thing) {} but I didn't need that, just the (thing) part. code:
|
# ? Apr 21, 2016 23:11 |
|
I've got an easy driver stepper motor wired up like this: http://www.schmalzhaus.com/EasyDriver/Examples/EasyDriverExamples.html. Between disconnecting it from USB, nothing else, when I worked on it at my makerspace and returning home, plugging it in again via USB it stopped working. I try a bunch of random poo poo, try pushing the easy driver deeper into the breadboard, doesn't work. But, when I remove the easy driver completely and push it back in, my stepper motor is working. What the hell was going on there?
|
# ? Apr 23, 2016 04:27 |
|
Sometimes breadboards can be finnicky
|
# ? Apr 23, 2016 05:04 |
|
Bad connection in the breadboard, presumably. Maybe a random bit of metal dust fell into one of the connection points and pulling the thing out cleared it up.
|
# ? Apr 23, 2016 05:04 |
|
Genuine Arduino or clone? I find the likeliness of weird issues like that increases square to how much I cheap out on eBay. I had a very similar issue with my RAMPS (arduino mega based) 3D printer board, replaced the clone board, used the same exact sketch, not a single problem 2 years later. EDIT: I have a question of my own - anyone messed about with trying to harvest power from flex style piezo vibration sensors? I was thinking of something like this circuit, made for "shake" generators, might do the trick: ReelBigLizard fucked around with this message at 15:04 on Apr 23, 2016 |
# ? Apr 23, 2016 14:57 |
|
I have an arduino with a shield attached and I want to battery power the thing, I've got some Li Ion batteries from a couple of old laptops, is there a thing that takes the ~3.7V and turns it into 5V for the arduino, but also won't discharge the batteries too far, or allows easily monitoring of the voltage?
|
# ? Apr 23, 2016 17:16 |
|
There's a few options, this is the sparkfun offering https://www.sparkfun.com/products/11231
|
# ? Apr 23, 2016 17:27 |
|
I have an old RAMBo board that suffered from the "no bootloader" bug Ultimachine had last year. Since its basically a brick, can I attempt to use an AVR programmer on it with Arduino software? Is there a for morons guide on how to burn a bootloader properly?
|
# ? Apr 23, 2016 18:10 |
|
ReelBigLizard posted:the likeliness of weird issues increases square to how much I cheap out on eBay. Hmm new thread title?
|
# ? Apr 24, 2016 09:28 |
|
Is Blynk any good? I'm building a thing for classrooms where the students get to vote one of four options, and I need a way to display all the options for the teacher. Alternatively, I'm looking at using Java RXTX, but that seems a bit more daunting.
|
# ? Apr 25, 2016 12:52 |
|
|
# ? May 30, 2024 14:12 |
|
So, I have a future project I've started planning out with the bf. Part of the project requires a micro-controller to control 84 transistors (we need to control an array of electromagnets). Is there a good option for handling a dmux of an arduino to that level?
|
# ? Apr 25, 2016 13:29 |