Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface LED and IR Sensor on BB-WI #12

Closed
zrajani opened this issue Oct 30, 2020 · 9 comments · Fixed by #18
Closed

Interface LED and IR Sensor on BB-WI #12

zrajani opened this issue Oct 30, 2020 · 9 comments · Fixed by #18
Assignees
Projects

Comments

@zrajani
Copy link
Owner

zrajani commented Oct 30, 2020

Now as we progress to the next stage where we will interface some of the sensor to our actual processing unit known as the Beaglebone Black Wireless (BB-WI). Under this issue we shall keep posting various header file issue or connection issue we may face during this interface phase.

@zrajani zrajani created this issue from a note in I-LETTERBOX (Tasks In Progress) Oct 30, 2020
@zrajani zrajani self-assigned this Oct 30, 2020
@zrajani
Copy link
Owner Author

zrajani commented Oct 30, 2020

The Beaglebone Wireless Datasheet has been attached and now the communication with the BeagleBone shall occur at IP address 198.162.8.1 as the Module has in-built Wifi but can also at the regular IP but the IP mentioned is for wireless communication with the board. For this purpose also the host machine through which we intend to login in shall be connected to the Beaglebone Wifi. After login, we are expected to go into the Cloud9 IDE where one can easily program and work with the terminal and the desktop of the BB-WI. The hardware is expected to arrive by Friday evening. Testing of the hardware is expected to occur on the same day as the next Task will be scheduled in the following week.

For more information refer Issue #6

@zrajani
Copy link
Owner Author

zrajani commented Nov 1, 2020

The Beaglbone Arrived and was tested for its wireless connection earlier at the beginning it didn't connect but then connect to the home wireless network. But still doesn't scan the WIfi [Mobile Hotspot] which may possess some issues during the demonstration. Thus research is carried out as to how can it connect to hotspots. Though the official forum says that it has issues with connecting to mobile hotspots.

@zrajani
Copy link
Owner Author

zrajani commented Nov 1, 2020

When creating the code for the project we had many ways to initialize the GPIO pins of the BBB-WI either we could choose the SimpleGPIO.h file from Derrek Molley or used some of the file operations like fopen to export the file and write the direction or use some of the users made header libraries. Thus we choose the library made available on the linkBBB-GPIO Libarary

To install this use the following commands:

  1. First Create a repository and download (clone) the Git Repository
  2. Then enter in the iobb folder using the command cd iobb
  3. Next we make the iobb files using make
  4. Lastly we install the make files using make install

@zrajani
Copy link
Owner Author

zrajani commented Nov 1, 2020

When the code was written and compiled successfully we faced an Issue "Segmentation Fault". On researching, we found that it occurs when we tried to access data which actually can't be accessed by the code. Thus finding a way for it to compile and execute the code properly to run.

@zrajani
Copy link
Owner Author

zrajani commented Nov 1, 2020

When the code was written and compiled successfully we faced an Issue "Segmentation Fault". On researching, we found that it occurs when we tried to access data which actually can't be accessed by the code. Thus finding a way for it to compile and execute the code properly to run.

In order to resolve it, one just needed to enter into the root mode of the beagle bone and then compile and execute the program so that access to the system files can be made. It is like taking the administrator role in windows when opening any application so that it doesn't require any permission to change or modify the files.

@zrajani
Copy link
Owner Author

zrajani commented Nov 1, 2020

Here the IR module connected to the BB-WI runs perfectly fine and as expected but a problem occurred here is that when just one wave was made a huge amount of count took place thus we needed to restrict the counting i.e. count a one when just one wave was made and not a 10 with a single wave. Thus we are trying to put in the delay function to see if it works. Also, the LED is kept on and doesn't go off when programmed in the code thus we look into that matter as well.

@zrajani
Copy link
Owner Author

zrajani commented Nov 2, 2020

Here the IR module connected to the BB-WI runs perfectly fine and as expected but a problem occurred here is that when just one wave was made a huge amount of count took place thus we needed to restrict the counting i.e. count one when just one wave was made and not a 10 with a single wave. Thus we are trying to put in the delay function to see if it works. Also, the LED is kept on and doesn't go off when programmed in the code thus we look into that matter as well.

Thus after doing some research we found out that we can take advantage of the POSIX API libraries which has usleep(microseconds) which can help us delay the function in other words this function will suspend the process until the given time in microseconds hence we use this function and this provided us with a good delay and proper count was able to achieve of the letters. This function is a part of unistd.h library under the POSIX API where the unistd stands for UNIx STanDard header file

@zrajani zrajani linked a pull request Nov 2, 2020 that will close this issue
@zrajani
Copy link
Owner Author

zrajani commented Nov 2, 2020

During downloading the library files required for the project we had some internet issues and we mistakenly typed "disable Wifi" and hence the Wifi disconnected permanently and later the BB-WI was not able to connect to the laptop as it was displaying "Network Adapter Connectivity Failed" thus we need to figure it out!

@zrajani
Copy link
Owner Author

zrajani commented Nov 2, 2020

During downloading the library files required for the project we had some internet issues and we mistakenly typed "disable Wifi" and hence the Wifi disconnected permanently and later the BB-WI was not able to connect to the laptop as it was displaying "Network Adapter Connectivity Failed" thus we need to figure it out!

To resolve this issue we tried the following scopes:

  1. Tried to connect and change the adapters also used combination thinking it is power management issues but the issue was still not resolved.
  2. We tried to remove the SD Card and tried to boot now the BB-WI started perfectly with its wifi automatically available [basically as it would normally start] thus we got the idea to try flashing the SD card again with the latest image and try it. And it worked perfectly fine and we were able to get wifi capabilities along with normal functionality back.

But still, where I was working (the place where we work) doesn't catch the wifi properly with BB-WI properly as the antenna of the BB-WI we would say is delicate or weak in terms of range. Thus when I went close to the router I got it connected and was able to get the required libraries downloaded in the BB-WI. Thus was able to achieve the desired task

I-LETTERBOX automation moved this from Tasks In Progress to Task Completed Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
I-LETTERBOX
  
Task Completed
Development

Successfully merging a pull request may close this issue.

2 participants