Go to advanced search

by kourpetis
Sat Jan 06, 2018 10:59 pm
Forum: General discussion
Topic: Can't pair HC06 with my Raspberry pi 3.
Replies: 6
Views: 1109

Re: Can't pair HC06 with my Raspberry pi 3.

this is the Raspbian version i use.

Code: Select all

[email protected]_Pi:~ $ uname -a
Linux Thanos_Pi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
by kourpetis
Sat Jan 06, 2018 10:54 pm
Forum: General discussion
Topic: Can't pair HC06 with my Raspberry pi 3.
Replies: 6
Views: 1109

Re: Can't pair HC06 with my Raspberry pi 3.

systemctl status bluetooth will give me this : [email protected]_Pi:~ $ systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled) Active: failed (Result: start-limit) since Sun 2018-01-07 00:51:45 EET; 7s ago Docs: man:bluetoothd(8) Pr...
by kourpetis
Sat Jan 06, 2018 10:50 pm
Forum: General discussion
Topic: Can't pair HC06 with my Raspberry pi 3.
Replies: 6
Views: 1109

Re: Can't pair HC06 with my Raspberry pi 3.

hciconfig will give me this

Code: Select all

[email protected]_Pi:~ $ hciconfig
hci0:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:E5:95:46  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN
        RX bytes:661 acl:0 sco:0 events:34 errors:0
        TX bytes:423 acl:0 sco:0 commands:34 errors:0
by kourpetis
Sat Jan 06, 2018 10:46 pm
Forum: General discussion
Topic: Can't pair HC06 with my Raspberry pi 3.
Replies: 6
Views: 1109

Re: Can't pair HC06 with my Raspberry pi 3.

bluetoothctl [NEW] Controller B8:27:EB:E5:95:46 BlueZ 5.23 [default] [CHG] Controller B8:27:EB:E5:95:46 Name: Thanos_Pi [CHG] Controller B8:27:EB:E5:95:46 Alias: Thanos_Pi [DEL] Controller B8:27:EB:E5:95:46 Thanos_Pi [default] [bluetooth]# show No default controller available [bluetooth]# this is w...
by kourpetis
Sat Jan 06, 2018 9:52 pm
Forum: General discussion
Topic: Can't pair HC06 with my Raspberry pi 3.
Replies: 6
Views: 1109

Can't pair HC06 with my Raspberry pi 3.

I've reading a lot of posts but nothing really helped. I have a CH06 ( https://grobotronics.com/bluetooth-module-for-arduino-hc06.html )module connected to my Arduino uno, it flashes so it is not paired. So i go to my raspberry pi 3 terminal and according to https://www.raspberrypi.org/forums/viewto...
by kourpetis
Tue Mar 22, 2016 5:08 pm
Forum: Python
Topic: how can i know when my popen is finished and force ctrl+c ?
Replies: 2
Views: 461

how can i know when my popen is finished and force ctrl+c ?

i have this code : import subprocess from time import sleep while 1 : fob=open('./message.txt','r') #open message.txt message=fob.readline() # put everything in message variable fob.close() # close file if (len(message)>0): # check to see if there is any character in message and if there is break fr...
by kourpetis
Sat Mar 19, 2016 12:54 pm
Forum: Python
Topic: python 3 serial readline problem from arduino.
Replies: 3
Views: 2055

Re: python 3 serial readline problem from arduino.

thanks ! that really helped me a lot !

python reads ! :D
by kourpetis
Sat Mar 19, 2016 9:47 am
Forum: Python
Topic: python 3 serial readline problem from arduino.
Replies: 3
Views: 2055

python 3 serial readline problem from arduino.

i have this code inside my arduino that Serial.print(variable) : if (numpressed==15){ //if enter on the pad was pressed, Serial.println(typedtext); Serial.flush(); delay(250);//output message and display remaining characters to serial console } i know that this works while my serial monitor in ardui...
by kourpetis
Fri Mar 11, 2016 11:48 am
Forum: C/C++
Topic: en equivelant in c for binary break ?
Replies: 9
Views: 1343

Re: en equivelant in c for binary break ?

I used the python code to my raspberry pi to control a 16 to 1 multiplexer. The x variable is a number from 0 to 15. I converted the x int to binary and assign each of the 4 bits 0 or 1 to the appropriate GPI0 so i can let the multiplexer know witch channel i would like to refer. this code in python...
by kourpetis
Fri Mar 11, 2016 9:49 am
Forum: C/C++
Topic: en equivelant in c for binary break ?
Replies: 9
Views: 1343

Re: en equivelant in c for binary break ?

byte transmit = 7; //define our transmit pin byte data = 10; //value to transmit, binary 00001010 byte mask = 1; //our bitmask byte bitDelay = 100; void setup() { pinMode(transmit,OUTPUT); } void loop() { for (mask = 0001; mask>0; mask <<= 1) { //iterate through bit mask if (data & mask){ // if bit...
by kourpetis
Fri Mar 11, 2016 9:23 am
Forum: C/C++
Topic: en equivelant in c for binary break ?
Replies: 9
Views: 1343

Re: en equivelant in c for binary break ?

shouldn't that be :

Code: Select all

int a;

if (a & 0x01)
   // bit o

if (a & 0x02)
  // bit 1

if (a & 0x03)
  // bit 2

if(a & 0x04)
  //bit 3
and this if statement checks if the n bit is 0 or 1 ?
by kourpetis
Fri Mar 11, 2016 7:31 am
Forum: C/C++
Topic: en equivelant in c for binary break ?
Replies: 9
Views: 1343

en equivelant in c for binary break ?

i have this code that converts a number to binary and then breaks those four digits and set's them to gpio to set them high or low ! binary_x="{0:04b}".format(x) GPIO.output(15, int(binary_x[0])) GPIO.output(13, int(binary_x[1])) GPIO.output(11, int(binary_x[2])) GPIO.output(7, int(binary_x[3])) thi...
by kourpetis
Wed Mar 02, 2016 10:41 am
Forum: Python
Topic: threading with while loop function! how to? willing to pay !
Replies: 7
Views: 1701

Re: threading with while loop function! how to? willing to p

I have a 16 to 1 multiplexer connected to my raspberry pi GPIOs so i can read 16 analog sensors, and i have the output of this multiplexer connected to an ADC. so by checking the iteration of number x i determine the channel that i am looking at ! at this point i break it in to binary and set the ap...
by kourpetis
Wed Mar 02, 2016 12:26 am
Forum: Python
Topic: threading with while loop function! how to? willing to pay !
Replies: 7
Views: 1701

Re: threading with while loop function! how to? willing to p

well i've tried what you wrote there but i get error messages i've imported threading import threading used it : def main(): #t = threading.Thread(target=write_msg) #t.daemon = True #t.start() app = QtGui.QApplication(sys.argv) main = Main() main.show() sys.exit(app.exec_()) but if i uncoment it i g...
by kourpetis
Tue Mar 01, 2016 6:58 pm
Forum: Python
Topic: threading with while loop function! how to? willing to pay !
Replies: 7
Views: 1701

Re: pyqt4 QTextEdit won't work in my code because of a loop

How about threading ? I've searched it a little bit and it seems that it could do the job. Any one has any idea of how could I multithread this code ?
by kourpetis
Mon Feb 29, 2016 1:33 am
Forum: Python
Topic: threading with while loop function! how to? willing to pay !
Replies: 7
Views: 1701

threading with while loop function! how to? willing to pay !

I have this code that creates a text edit window : class Main(QtGui.QMainWindow): def __init__(self, parent = None): QtGui.QMainWindow.__init__(self, parent) self.initUI() print("just started the ui") write_msg() def initUI(self): print("i am in initUi") self.text = QtGui.QTextEdit(self) self.setCen...
by kourpetis
Sat Feb 27, 2016 12:27 am
Forum: Advanced users
Topic: The maximum frequency Raspberry pi 2 audio jack can get ?
Replies: 2
Views: 817

The maximum frequency Raspberry pi 2 audio jack can get ?

Does any one know if the raspberry pi 2 is capable to play from the audio jack frequencies over 20Khz as audio ! and what would be the maximum frequency that it can playback !
by kourpetis
Tue Feb 23, 2016 5:21 pm
Forum: Python
Topic: how can i pipe a string to minimodem
Replies: 6
Views: 1238

Re: how can i pipe a string to minimodem

I got errors : File "./Documents/Examples/texting.py", line 145, in main p1.stdin.write(message_string) TypeError: 'str' does not support the buffer interface using this code : if key_pressed==0 and key!=0: message_string = ''.join(message) print(message_string) p1 = subprocess.Popen(["minimodem" , ...
by kourpetis
Tue Feb 23, 2016 10:13 am
Forum: Python
Topic: Read analog data (get Joystic value)
Replies: 4
Views: 1393

Re: Read analog data (get Joystic value)

i have used an MCP3002 ADC to read analog on my raspberry pi 2. it was connected to python through SPI and it could get up to 1Mhz. i have used an 4067 16 to 1 multiplexer and conected the output to the analog read pin of the ADC. So by setting 4 GPIOs on my Raspbery High or Low could read 16 analog...
by kourpetis
Tue Feb 23, 2016 10:08 am
Forum: Python
Topic: how can i pipe a string to minimodem
Replies: 6
Views: 1238

Re: how can i pipe a string to minimodem

oooooooooooooooooooooooooook ! i'll try it this afternoon and i'll let's you now how it went !
by kourpetis
Tue Feb 23, 2016 9:52 am
Forum: Python
Topic: how can i pipe a string to minimodem
Replies: 6
Views: 1238

Re: how can i pipe a string to minimodem

so :

Code: Select all

import subprocess

p1 = subprocess.Popen(["minimodem , "--rx" , "300"], stdout=subprocess.PIPE)
p1.stdout.write(message_string)
would return everything that minimodem detects as input back to my message_string ?
by kourpetis
Tue Feb 23, 2016 8:49 am
Forum: Advanced users
Topic: sound card that doesn't filter oultrasounds ????????????
Replies: 2
Views: 466

sound card that doesn't filter oultrasounds ????????????

i am working on a project that i have to play and record ultrasounds?
does anyone have any idea where could i get a usb sound card that can handle ultrasounds ( outgoing and ingoing )?
by kourpetis
Tue Feb 23, 2016 3:13 am
Forum: Python
Topic: how can i pipe a string to minimodem
Replies: 6
Views: 1238

Re: how can i pipe a string to minimodem

i got this error message at my terminal. File "./Documents/Examples/texting.py", line 142 os.system(echo message_string | minimodem --tx 300) ^ SyntaxError: invalid syntax this is the code that i am using : if key_pressed==0 and key!=0: message_string = ''.join(message) print(message_string) os.syst...
by kourpetis
Tue Feb 23, 2016 2:48 am
Forum: Python
Topic: how can i pipe a string to minimodem
Replies: 6
Views: 1238

how can i pipe a string to minimodem

I have this code in Python that eventually creates a string of characters. how can i launch minimodem to my terminal and automatically pipe this string so it can start transmit? minimodem is already installed and the only think that needs to be typed to my terminal is '' minimodem --tx 300 ''. does ...
by kourpetis
Sun Feb 21, 2016 9:57 pm
Forum: Python
Topic: function problem
Replies: 1
Views: 397

function problem

I have this code that runs and sets the GPIOS 7,11,13,15 to my Raspberry Pi 2 HIGH or LOW so I can address the 16 multiplexer channel accordingly, then reads the analog voltage through and MCP3002 SPI, and returns if there was a keypress or a key released, plus which key that was. everything was ok ...

Go to advanced search