diff --git a/Rmodule/Rmodule.aps b/Rmodule/Rmodule.aps
index 09128c2..101764b 100755
--- a/Rmodule/Rmodule.aps
+++ b/Rmodule/Rmodule.aps
@@ -1 +1 @@
-Rmodule14-Nov-2013 11:48:5715-Nov-2013 14:38:09241014-Nov-2013 11:48:5744, 19, 0, 730AVR GCCdefault\Rmodule.elfC:\Hard\Git\Rmodule\AVR SimulatorATmega8.xmlfalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000main.cuart\uart.conewire\onewire.cuart\uart_addon.cuart\uart.hres\strings.honewire\onewire.huart\uart_addon.hdefault\Rmodule.lssdefault\Rmodule.mapdefaultNOatmega811
Rmodule.elfdefault\1-Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsdefault1C:\Program Files\Atmel\AVR Tools\AVR Toolchain\bin\avr-gcc.exeC:\Program Files\Atmel\AVR Tools\AVR Toolchain\bin\make.exe00000main.c100001res\strings.h1
+Rmodule14-Nov-2013 11:48:5717-Nov-2013 15:50:59241014-Nov-2013 11:48:5744, 19, 0, 730AVR GCCdefault\Rmodule.elfc:\Hard\Rmodule\AVR SimulatorATmega8.xmlfalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000main.cuart\uart.conewire\onewire.cC:\Hard\Rmodule\uart\uart_addon.cuart\uart.hres\strings.honewire\onewire.hC:\Hard\Rmodule\uart\uart_addon.hdefault\Rmodule.lssdefault\Rmodule.mapdefaultNOatmega811
Rmodule.elfdefault\1-Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsdefault1C:\Program Files\Atmel\AVR Tools\AVR Toolchain\bin\avr-gcc.exeC:\Program Files\Atmel\AVR Tools\AVR Toolchain\bin\make.exec:\Hard\Rmodule\uart\uart.hc:\Hard\Rmodule\res\strings.hc:\Hard\Rmodule\onewire\onewire.hc:\Hard\Rmodule\main.cc:\Hard\Rmodule\uart\uart.cc:\Hard\Rmodule\onewire\onewire.c00000main.c100001onewire\onewire.h1
diff --git a/Rmodule/main.c b/Rmodule/main.c
index 824a365..b8114bb 100755
--- a/Rmodule/main.c
+++ b/Rmodule/main.c
@@ -23,27 +23,35 @@ void getListDevices(void){
uint8_t i;
uint8_t id[OW_ROMCODE_SIZE];
uint8_t diff, nSensors;
+ char buffer[40];
- uart_puts_p("\r\nScanning 1-wire bus\r\n");
+ uart_puts("\r\nScanning 1-wire bus\r\n");
ow_reset();
nSensors = 0;
diff = OW_SEARCH_FIRST;
while ( diff != OW_LAST_DEVICE) {
diff = ow_rom_search( diff, &id[0] );
- if ( diff != OW_PRESENCE_ERR && diff != OW_DATA_ERR && diff != OW_LAST_DEVICE ) {
+ //if ( diff != OW_PRESENCE_ERR && diff != OW_DATA_ERR && diff != OW_LAST_DEVICE ) {
for ( i=0; i < OW_ROMCODE_SIZE; i++ ){
- uart_puthex_byte(id[i]);
- uart_puts_p( " " );
+ sprintf(buffer,"%02X ",id[i]);
+ uart_puts(buffer);
}
uart_puts("\r\n");
- }
+ //}
nSensors++;
}
+ sprintf(buffer,"Found %d devices",nSensors);
+ uart_puts(buffer);
}
-int main(void)
-{
+int main(void){
+
uart_init(UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU));
+ #ifndef OW_ONE_BUS
+ ow_set_bus(&PIND,&PORTD,&DDRD,PD6);
+ #endif
+
+ sei();
char cmd = '0';
while (cmd != 'q'){
uart_puts_p(MainMenuItemTitle);
diff --git a/Rmodule/rmodule.aws b/Rmodule/rmodule.aws
index c41f4a0..7b7681b 100755
--- a/Rmodule/rmodule.aws
+++ b/Rmodule/rmodule.aws
@@ -1 +1 @@
-
+