Search found 10 matches
- 18 Jan 2012, 23:26
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
Hello again! So, after a week or so I am back ( I had exams and I really needed to study ) and I can see docilio already has the TPA81 working. I just checked my circuit using this table in this blog: http://www.stewartallen.org/2010/08/designing-lego-mindstorms-nxt-sensors/ and it seems everything ...
- 11 Jan 2012, 20:10
- Forum: Mindstorms Software
- Topic: C++ NXT Bluetooth Library
- Replies: 4
- Views: 9533
Re: C++ NXT Bluetooth Library
Ok, so i added the files to the project I created, but when compiling I get these errors: ]1>------ Build started: Project: NXT library, Configuration: Debug Win32 ------ 1>Compiling... 1>bluetooth.cpp 1>c:\nxt c++ bluetooth library\bluetooth.cpp(42) : error C2664: 'CreateFileW' : cannot convert par...
- 08 Jan 2012, 14:22
- Forum: Mindstorms Software
- Topic: C++ NXT Bluetooth Library
- Replies: 4
- Views: 9533
C++ NXT Bluetooth Library
I was wondering if anyone had successfully set up this library http://www.norgesgade14.dk/bluetoothlibrary.php in Visual Studio or Visual c++ Express. I have already used NXT++ with no problems however it lacks a lot of features. It only mentions we need to add the files to our project, however it k...
- 08 Jan 2012, 13:32
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
I just tried the new code you (afanofosc) provided and I got this output: 0 -35 ... where ... is the cnt variable So I2CCheckStatus() is returning -35, which corresponds to ERR_COMM_BUS_ERR (Something went wrong on the communications bus). But as I2CWrite() returned no error, doesnt that mean that a...
- 07 Jan 2012, 17:25
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
I have already checked the pins many times. Here's the code I am using in Picaxe
It seems to do the job
Code: Select all
hi2csetup i2cmaster, $D0, i2cfast, i2cbyte
main:
do
hi2cin 2,(b0, b1, b2, b3, b4, b5, b6, b7)
pause 50
debug
loop
- 06 Jan 2012, 18:22
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
I connected the pull-up resistors (82k) again but it keeps not connecting to the TPA81. I tested the sensor with a Picaxe 28x2 microcontroller and it worked perfectly .
- 06 Jan 2012, 18:02
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
I just tried what both of you said, and came to a few conclusions. I used inbuf[]; without saying the length I wanted and after I2CRead I used ArrayLen() and found out that the array was only 1 byte long, meaning that I could only read inbuf[1] which was 0; So probably NXT isnt reading the sensor co...
- 05 Jan 2012, 22:05
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
So I reinstalled both the Enhanced Firmware and BCC but I keep getting the same error. I added some ways to debug the program. // READ TPA81 #define TPA81_PORT IN_1 #define TPA81_ADDR 0xD0 void MyI2CRead(byte port, byte addr, byte reg, byte cnt, byte& outbuf[]) { TextOut( 0, LCD_LINE1, "MyI...
- 05 Jan 2012, 21:32
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
Re: NXC - Reading temperature from TPA81
Ok, so I tried your program but I keep getting the same File error! -1
I am starting to think this problem is somehow related to the NXT and not to the program. Any chance it might be the firmware version?
I am starting to think this problem is somehow related to the NXT and not to the program. Any chance it might be the firmware version?
- 05 Jan 2012, 20:34
- Forum: Mindstorms Software
- Topic: NXC - Reading temperature from TPA81
- Replies: 34
- Views: 28981
NXC - Reading temperature from TPA81
Hi, I recently got an NXT and I thought that using more sensors connected through i2c would bring a lot of new possibilities. So I got the TPA81 sensor in order to make a robot that would extinguish candles. (TPA81 datasheet here: http://www.robot-electronics.co.uk/htm/tpa81tech.htm ). I was able to...