Can Atmel ATTINY84 read I2C without adding any program or module? - arduino

I am recently connecting a gyroscope(L3G4200D) to ATTINY84,however, the gyroscope is using I2C and the ATTINY84 is using USI, as a result, I have some problem doing programming. I am using Arduino Uno to be the ISP, and I have connected the two wire of gyroscope to SDA and SCL pin on Attiny84 but it still doesn't work. Does anyone have any solution?

This might help you solve your problem!
http://www.dexterindustries.com/howto/working-with-avr/any-port-any-pin-a-twi-master-for-attiny-atmega/

Solution is in using right library which do software I2C. get https://github.com/svoisen/TinyWire library, connect 4 wires ( VCC, GND, SDA, SCL ), do not forget 2 pull-up 4K7 resistors to SDA/SCL. that's all.

Related

ESP32 - Connect arduino nano with ESP32 with Serial

I want to connect my arduino nano with my ESP-32 (in order to use it for wireless communications).
I got this ESP board (see pic).
Any idea how I can connect it? I can't find any documentation for the pin on this board.
Check this,
https://www.espressif.com/en/products/hardware/esp32/resources
You can directly use ESP32 to perform the same functions of arduino.

I2C pins of nRF52832 Sparkfun breakout board require pull-up resistors?

I am trying to use press buttons via I2C using nRF52832 Sparkfun breakout board. I followed the steps given in nrf52832-breakout-board-hookup-guide and changed the I2C Data and CLK pins to 24 and 25, respectively. I connected these pins and GND of the board to the corresponding pins and scanned for I2C devices. But it gave error = 2 (no I2C device) for all addresses. Should I use pull-up resistors? I would appreciate any help.
Yes pull-up resistors on both SCL and SDA MUST be provided for I2C communication. Please see the following links:-
Infocenter specification (See very end of section)
Devzone Question 1
DevZone Question 2
DevZone Question 3
I also recommend asking similar questions on Electrical Engineering or directly on the Nordic DevZone as there is higher chance of this being answered quicker.
I hope this helps
Thanks for your reply. I think it depends on the I2C device that we are using. This module has internal pull-up resistors, but it may not be enough for some devices. So, I disabled the internal pull-ups by replacing GPIO_PIN_CNF_PULL_Pullup with GPIO_PIN_CNF_PULL_Disabled for both SDA and SCL pins in the library and used external ones.

How to connect sim900a module with arduino to transmit AT commands?

I hav tried connecting through serial communication. But i hav a problem with that. I think AT commands can be also given through I2C communication. But I am getting stuck at some point. Can anyone help with step by step instructions to make a connection? thank you
You need mainly 3 pins to connect Arduino Uno and GSM Modem.
RxD
TxD
GND
This Tutorial will clear all your doubt about hardware connection and also about Arduino sketch you have write.

GSM Module code Not Working On GSM breakout board

I'm in a situation and need some advice.
Scenario 1:
Arduino Uno/Genuino +
ICOMSAT SIM900 Module(http://www.itead.cc/icomsat.html)
(placed the jumpers such that Digital Pin 2 is rx and 3 is TX on the shield)
Code Used: The send receive SMS example code in the arduino website.(
(https://www.arduino.cc/en/Tutorial/GSMExamplesReceiveSMS)
Everything Works fine without a glitch.
Scenario 2:
Arduino Uno/genuino +
GSM breakout board(https://www.google.co.in/search?q=sim900A&espv=2&biw=1600&bih=717&source=lnms&tbm=isch&sa=X&ved=0CAYQ_AUoAWoVChMIqd748qb8yAIVYXumCh2s2Aaq#tbm=isch&q=sim900a+gsm+module&imgdii=9zJcFQBaoLAKzM%3A%3B9zJcFQBaoLAKzM%3A%3B7eDw6qGc3qZjMM%3A&imgrc=9zJcFQBaoLAKzM%3A)
Had loads of issues with softwareSeial.h library and ended up cross connecting the default on board rx/tx with GSM board's RX/TX and everything worked fine. (though I didn't liked the fact that everytime during programming I had to change connections to upload a sketch)
code used is from here (http://www.theengineeringprojects.com/2014/06/send-sms-with-arduino-uno-and-sim900d-using-at-commands.html)
Now my Problem:
Since the shields are very costly, I decided to settle on the cheaper boards for my project. But the Code used for the GSM shield was so easy to understand (since the library was doing all the heavy lifting) I tried to use that. I connected Rx of GSM board to pin 3 and TX to pin 2 of arduino and uploaded the same code I used for the GSM shield scenario. But the code won'r work, I tried to tinker a few blocking things like the enable pin code where the shield is brought up etc. but no luck. Can anyone put some light on it, has this been tried before, is it not supposed to work the was i want it to ?
Thanks a lot in advance.

Can't get serial output while using Ethernet

I started to experimenting with the Arduino Ethernet shield and got it working with not much effort. However, when I try to debug through the hardware serial port of the board, I get nothing, and though the program still runs, and I know it should be giving me something, it doesn't. Truth be told, I haven't got a clue of what's going on. How do I fix this problem?
P.S. I am using one of the example sketches included in the Arduino IDE.
The Ethernet shield does not use the RX and TX pins (0,1) and I have personally used Serial communication with the shield before.
So it definitely had to do with your code. Can you post your code?
Also have you connected anything to digital pins 0 and 1?
The Arduino Ethernet board is not equivalent to Arduino Uno + Etherent shield. In the Arduino Ethernet board the USB-to-serial chip is not present.
From the official Arduino Ethernet board page
The Ethernet differs from other boards in that it does not have an
onboard USB-to-serial driver chip, but has a Wiznet Ethernet
interface.
So I don't think you can print any values in the serial monitor.
Update:
You need an external FTDI adapter like http://arduino.cc/en/Main/USBSerial get the serial communication between Arduino and your computer to work.

Resources