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.

egeorgiou

Member Since 12 Apr 2011
Offline Last Active Dec 03 2012 09:25 PM
-----

Posts I've Made

In Topic: Netduino + Android

01 December 2012 - 09:37 PM

Hi egeorgiou,

I've used this adapter,

http://www.mdfly.com...products_id=769

The adapter suports the SPP profile. you can probably find it cheaper on eBay. Basically you just open a COM port on the Netduino and talk to it with whatever serial App you have on your Android device.

If you want to develop your own Android App, I have found that Basic4Android is absolutely the easiest way,

http://www.basic4ppc.com/

The syntax is pretty much like VB Net and for a list of libraries,

http://www.basic4ppc...x.php/Libraries

Baxter


Hi Baxter,

thanks so much for your suggestions, they are really helpful.

I'm a big fan of sparkfun, so i'm planning on using the WRL-10269 BlueSMiRF Silver (https://www.sparkfun.../products/10269)

I'm comfortable using eclipe and doing the programming in Java; I took the tutorials offered for free by Marakana; here is a link to there android bootcamp:
https://www.youtube....08A97D36D5A255F

What I was hoping for, was someone having put together an open source library that does all the dirty work of communicating between the two devices and manages different data types (i.e. string, int, float, byte, etc....)

Bluetooth comms on Android is not fun :(

In Topic: Netduino Plus 2 - I2C not working

01 December 2012 - 09:19 PM

Dave VanderWekke & egeorgiou

Please replace the Execute line in your code with the following to see how many total data bytes (reads and writes, not counting device addresses) have been sent in your transactions. This can help diagnose if the device is responding at all. The result should be the total number of bytes sent and received. Subtract the bytes sent (one in your case) and that's the total number of bytes received. If you haven't received any bytes, then probably don't print the read buffer contents.

int total = adxl345.Execute(actions, 1000);
Debug.Print(total + " bytes transferred successfully over I2C");

I have had success with DS1307 and 24FC1025 over both hardware and software I2C protocols with the Netduino Plus 2. Wishing you success soon too.

One more thing... it looks (according to SparkFun) like the 9 degrees of freedom stick can accept a variety of input voltages 3.3V-16V, while the ADXL345 breakout boards can only go up to 3.6V. I would only run a simple ADXL345 breakout at 3.3V, but as for that bigger board with more chips you may want to try an external power source or at least the 5V input instead. Or at least verify the current requirements. Just some thoughts to try to cover all the bases. And be careful with applying the right voltages.


Hi Dave,

Thanks for your help. Still no luck, it returns 0.

I also tried at 5v but no luck. Even though on the N+1 it does work at 3.3v. Thanks, it was a good idea.

hoping for a solution soon. I have a horrible feeling it might be a hardware issue.

In Topic: Netduino Plus 2 - I2C not working

30 November 2012 - 10:53 PM

This code should return the DeviceID correct? You are looking for a response of 0xE5 but you are getting 0?


Yes, simply send 0x00 to the address 0x53; which should return 0xE5 or the integer 229.

In Topic: Netduino Plus 2 - I2C not working

30 November 2012 - 10:28 PM

Egeorgiou,

SecretLabs.NETMF.Hardware.NetduinoPlus needs to be replaced with just SecretLabs.NETMF.Hardware.Netduino. This is a change with the new firmware.

Firmware Update Look at second post.

Chuck


Well spotted!

My mistake I copied the wrong source from the example I used on the N+1; too many copies of VS open

Here is the code for the N+2
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace NetduinoApplication_I2C_Example
{
    public class Program
    {
        public static void Main()
        {
            Byte[] _data = new byte[1] { 0 };

            I2CDevice adxl345 = new I2CDevice(new I2CDevice.Configuration(0x53, 100));
            I2CDevice.I2CWriteTransaction write = I2CDevice.CreateWriteTransaction(new Byte[] { 0x00 });
            I2CDevice.I2CReadTransaction read = I2CDevice.CreateReadTransaction(_data);
            I2CDevice.I2CTransaction[] actions = new I2CDevice.I2CTransaction[] { write, read };
            adxl345.Execute(actions, 1000);
            Debug.Print(_data[0].ToString());

        }

    }
}

In Topic: Netduino Plus 2 - I2C not working

30 November 2012 - 10:15 PM

I just hacked out some code from one of my projects and hooked up the ADXL345. It does NOT work with the ND+2 so far. It is throwing an I2C error. I have to do a little more digging to try and get the exact error message, but so far it does NOT work.


Thanks for trying it out.

Is your ADXL345 set to high or low for the address?

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.