Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

ATTiny85 talking to Netduino?


  • Please log in to reply
7 replies to this topic

#1 Larsey

Larsey

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 30 June 2014 - 06:48 AM

I've run out of options, so I'm wondering if someone here has made a successful project where a ATTiny85/84 talks to a Netduino over serial?

 

My motivation for trying this, and not going for a Netduino mini is that the Attiny85 is silly small, has the right a mouth of pins and is cheap. The power consumption is ultra low, making it runable on batteries.

 

I've already tried over at the Arduino-camp, but it's like they are allergic to Netduino or something :P. So I hope someone here has some experience with Arduino/ATTiny to give me some hints. I have the following "sketch":

#include <SoftwareSerial.h>

const int rx = -1;
const int tx = 3;

SoftwareSerial serial(rx, tx);

void setup() 
{ 
  pinMode(tx, OUTPUT);
  serial.begin(2400);
} 

void loop() 
{ 
  String data = "Hello World";
    
  for(int k = 0; k < data.length(); k++ )
  {
    serial.write(0xAA);
    serial.write((byte)data[k]);
  }
  
  serial.write(0xA9);
  
  delay(1000);
}

This should be the same as the C# from my post http://forums.netdui...odules/?p=58949

 

But I have no clue if this works or not :-/

 



#2 Frode

Frode

    Advanced Member

  • Members
  • PipPipPip
  • 202 posts
  • LocationNorway

Posted 30 June 2014 - 10:29 AM

Hi Larsey, I haven't got any info for you (sorry), but this sounds like an interresting project. I've ordered a couple of ATTiny85's today, and will try the same when they arrive.

 

What hardware setup do you use for programming the ATTiny?



#3 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 30 June 2014 - 11:39 AM

I used various *duinoes linked together and there's no problem at all in the serial communication, as long you respect the external hardware constraints.

Frode asked a good question: tell us how did you connect the boards...

 

I don't have sketches here in the lab, but I may check once at home.

Good luck.


Biggest fault of Netduino? It runs by electricity.

#4 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 30 June 2014 - 06:27 PM

https://learn.adafru...oducing-trinket

http://www.adafruit....or-the-trinket/

https://learn.adafru...usb-serial/code



#5 Larsey

Larsey

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 01 July 2014 - 07:00 PM

Hey all, thanks for the response!

 

@baxter the adafruit thingy looked real cool, but still "overkill" as I want to produce 5++ nodes to report back to my netduino using 433 MHz RF.

 

@Frode my hardware setup, enjoy :P :

 

http://bildr.no/image/cXArSktm.jpeg

 

I soldered the programmer-extender-thingy myself :P Version 2 of the would be with some female pin headers too so I don't have to take it on an off the breadboard all the time :P

 

- 433 Mhz transmitter / receiver set

- USBasp programmer for Attiny85/84++



#6 Frode

Frode

    Advanced Member

  • Members
  • PipPipPip
  • 202 posts
  • LocationNorway

Posted 02 July 2014 - 08:53 PM

Hmm, the picture of the hardware setup is too small to see anything.

I got the ATTinys yesterday, but I haven't got a programmer for it yet. I'll take a look at the USB programmer you posted. I've seen there are lots of them on Ebay. You only need that USB device to program the ATTiny?

#7 Larsey

Larsey

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts

Posted 03 July 2014 - 12:20 PM

Yepp Frode, you only need that usb thingy to program the ATTiny85. While I have not made this project to work, I did make the ATTiny85 blink a LED :P So it works :D

 

Really recommend soldering something together since its way more easier than looking up the pin locations and the programmers pins all the time :D

 

The hardware setup is really easy for these small modules: 5V and GND all around RX on the netduino to the data pin (one of them, not both) to the receiver (it has 4 pins). Attiny pin 3 (hardware pin 2 i think) is connected to data on the transmitter (it has 3 pins).



#8 gismo

gismo

    Advanced Member

  • Members
  • PipPipPip
  • 110 posts

Posted 02 July 2015 - 09:20 PM

I hope this thread isn't dead.. I've been off/on struggling to get some ATTiny85 chips to comminicate via I2C with a netduino.... They seem to work fine when doing ATTiny arduino to Arduino, but there must be some subtle differences in the I2C protocol buried in the ATTtiny I2C firmware that NetMF/Netduino don't like..I still haven't found it.

 

Larsey/Frode, you still working with the ATTinys?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.