How good are you at soldering? Here is the STM32F103C8T6 microcontroller board that I use and have to solder all of the pins. Sometimes when I solder pins to the board, the connection looks OK and even tests OK with continuity on a multimeter. However, the solder connections even though they pass those two …
Tag: Arduino
Jan 27 2018
How to keep an ENC28J60 Module from Freezing
The ENC28J60 module is good for attaching an Arduino to a LAN or the Internet. The one real problem in doing so is how to keep an ENC28J60 module from freezing. No, not temperature wise ! 🙄 (‘Freezing’ in the sense of locking up, stop working, etc.) There are many Ethernet arduino libraries for the …
Jan 25 2018
Switching 12V from a 5V Arduino
I built a circuit to allow switching 12V from a 5V Arduino. Here is the wiring diagram and a picture of the actual circuit: Get the Fritzing source HERE. The side with two connections attaches to the 12V device being switched ON/OFF. The side with three connectors, connects to the 12V …
May 13 2016
I2C Wire Chat Between Two Arduinos
Someone asked me the other day if it was possible to have a ‘chat’ between Arduinos using the I2C Wire library. I came up with ‘proof of concept’ code called ‘I2C Wire Chat Between Two Arduinos’. Here is the sketch: I2C Wire Chat Between Two Arduinos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
/* I2C wire chat From: earl@microcontrollerelectronics.com Analog Pin 5 SCL Analog Pin 4 SDA Common ground */ #include <Wire.h> #define WireDevice 8 String buffer; int mode; void setup() { Serial.begin(9600); } void loop() { while (Serial.available()) { char c = Serial.read(); if (c != '\n') { if (c == '\r') continue; buffer += c; continue; } else { buffer += '\0'; if (buffer[0] == '#') { if (buffer[1] == 'm') { if (mode != 'm') { mode = 'm'; master(); Serial.println("Master mode"); } } if (buffer[1] == 's') { if (mode != 's') { mode = 's'; slave(); Serial.println("Slave mode"); } } buffer = ""; continue; } if (mode == 'm') { Wire.beginTransmission(WireDevice); int i = 0; while (buffer[i]) { Wire.write(buffer[i]); i +=1; } Wire.endTransmission(); } else Serial.println("Invalid Mode"); buffer = ""; } } } void master() { Wire.begin(); Serial.println("Master Initialized"); } void slave() { Wire.begin(8); Wire.onReceive(receiveEvent); Serial.println("Slave Initialized"); } void receiveEvent(int howMany) { while (1 < Wire.available()) { char c = Wire.read(); Serial.print(c); } char c = Wire.read(); Serial.println(c); } |
Setup two Arduinos connected by a length of …
Aug 31 2015
A Python script to run the Arduino MiniPirate Sketch
A while back I wrote about the BusPirate. You can view that post here. In it, I mention an Arduino sketch called the “MiniPirate” which allows you to try some of the functions of the BusPirate on an Arduino. Over time, I have found that sketch to be very useful. You can use it to …
Jul 06 2015
Arduino Leonardo and SPI Communications
I just found out that my favorite Arduino of choice (the Leonardo) has a problem with SPI “Serial Peripheral Interface” communications (if you need to use the SS pin). For SPI (which is bidirectional) , the following pins are normally used: SS – Slave Select – digital 10. You can use other digital pins, but …
Aug 09 2014
Wireless Bluetooth Module for your Arduino
If you’d like to wirelessly attach your Arduino to another device (such as a phone or tablet) via bluetooth, I’d recommend the serial bluetooth module from Elecrow.com. Here is what they look like: The module has firmware from BOLUTEK. The PDF document with all of the available BOLUTEK commands is BLK-MD-BC04-B_AT COMMANDS . I …
Aug 07 2014
Connecting an Arduino to a LAN with the ENC28J60
I picked up a couple of these modules: from Elecrow.com so I could attach (communicate with and control) several of my Arduinos through a LAN connection. The main chip is the ENC28J60 from microchip.com. These modules are better than an Ethernet Shield in that you can easily attach these to any Arduino and they …
Aug 04 2014
Atmel versus PIC Microcontrollers
Many years ago (I am old ;-)) I was asked which microcontrollers are best, ones from PIC (microchip.com) or ones from Atmel (atmel.com). At the time I was asked, there was a lot of discussion about chip architecture, instruction sets and which chip was best. I thought at the time and still feel this way, …
Recent Comments