Answers.Body: <p><a href="https://github.com/schodet/nxt-python" rel="nofollow noreferrer">nxt-python</a> is a popular Python library that can communicate with an NXT via USB or Bluetooth.</p>
  <p>Most of the APIs are designed to remotely control the NXT, but the <a href="https://ni.srht.site/nxt-python/latest/api/brick.html#mailboxes" rel="nofollow noreferrer">Mailbox</a> feature is useful to send information to a program that is running on the NXT.</p>
  <p>I would expect that this should be compatible with the <a href="https://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/group___comm_module_functions_gaa0dcf38898e9b509650a456d1393e9c7.html" rel="nofollow noreferrer">SendMessage</a> and <a href="https://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/group___comm_module_functions_ga2d0f44fe54ee34627d4423de5a08539e.html" rel="nofollow noreferrer">ReceiveMessage</a> functions in NXC.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-06-19T22:04:53.333Z
Answers.LastActivityDate: 2024-06-19T22:04:53.333Z
Answers.UserDisplayName: David Lechner
Body: <p>I am new on this platform and hope for some help.</p>
  <p>I am doing a school project right now and we are working with Lego Mindstorms NXT and write the program with the Bricx Command Center. I know that this is pretty old but maybe some of you have tips or ideas. So my idea was to create the game rock paper scissors but in a way the player never wins. To do that I worked with the Mediapipe Hand gesture recognition I am running in PyCharm which works great. My webcam analyses the hand gesture.</p>
  <p>We have to also work with the Bricx Command Center which works like this: I built a Lego hand and the thumb, index finger, and the rest of the fingers are connected to 3 motors. With those I can make the opposite gesture to the gesture the player made. So when the program analyses the players gesture I want it to send a string via USB to the NXT. The NXT knows the string and makes the corresponding gesture. But that's exactly my problem, because I also need a program written in the Bricx Command Center which can receive the string I send from PyCharm via USB. Are there any ideas or solutions how I could do that? It would be very helpful. I tried many things also asking ChatGPT but as we all know this isn't often that helpful.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-06-19T21:31:07.043Z
Comments.Text: Since you are using Bricx Command Center is it fair to presume that you're doing all of this in a Microsoft Windows OS environment?
Comments.UserDisplayName: chicks
Tags: <mindstorms><programming><nxc><python>
Title: Please help me: Sending String from PyCharm via usb to NXT, which is programmed by Bricx CC
UserDisplayName: user25584917
ThreadText: # Please help me: Sending String from PyCharm via usb to NXT, which is programmed by Bricx CC
  
  (Asked by: username_0 on 2024-06-19)
  
  I am new on this platform and hope for some help.
  
  I am doing a school project right now and we are working with Lego Mindstorms NXT and write the program with the Bricx Command Center. I know that this is pretty old but maybe some of you have tips or ideas. So my idea was to create the game rock paper scissors but in a way the player never wins. To do that I worked with the Mediapipe Hand gesture recognition I am running in PyCharm which works great. My webcam analyses the hand gesture.
  
  We have to also work with the Bricx Command Center which works like this: I built a Lego hand and the thumb, index finger, and the rest of the fingers are connected to 3 motors. With those I can make the opposite gesture to the gesture the player made. So when the program analyses the players gesture I want it to send a string via USB to the NXT. The NXT knows the string and makes the corresponding gesture. But that's exactly my problem, because I also need a program written in the Bricx Command Center which can receive the string I send from PyCharm via USB. Are there any ideas or solutions how I could do that? It would be very helpful. I tried many things also asking ChatGPT but as we all know this isn't often that helpful.
  
  **Tags:** mindstorms, programming, nxc, python
  
  > **Comments:**
  > **username_1**: Since you are using Bricx Command Center is it fair to presume that you're doing all of this in a Microsoft Windows OS environment?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-06-19. Score: 4
  
  [nxt-python](https://github.com/schodet/nxt-python) is a popular Python library that can communicate with an NXT via USB or Bluetooth.
  
  Most of the APIs are designed to remotely control the NXT, but the [Mailbox](https://ni.srht.site/nxt-python/latest/api/brick.html#mailboxes) feature is useful to send information to a program that is running on the NXT.
  
  I would expect that this should be compatible with the [SendMessage](https://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/group___comm_module_functions_gaa0dcf38898e9b509650a456d1393e9c7.html) and [ReceiveMessage](https://bricxcc.sourceforge.net/nbc/nxcdoc/nxcapi/group___comm_module_functions_ga2d0f44fe54ee34627d4423de5a08539e.html) functions in NXC.
  
  
  ---
  
  